Post

Khalid | Python Tasks Adventurer 🐍
✅ Answer The correct answer is: 2. x = ("A", "B", "C") (Tuple) 🎉 Why? ✔️ Tuples are immutable, so they’re safer for fixed choices. ⚡ More memory-efficient than lists. 🧭 They're ordered and indexable, so random.choice() works perfectly
English
1
0
0
33
Khalid | Python Tasks Adventurer 🐍
❌ Let’s look at the other options: 1. List – ✅ Valid, but it's mutable, not ideal for constants. 3. Set – ❌ Not allowed with random.choice() – sets are unordered. 4. String – Technically works, but it's not clear you're choosing from multiple items.
English
0
0
0
26
分享