Post

Khalid | Python Tasks Adventurer 🐍
Wait… aren’t they the same? 🐍 sample() makes sure you get different items — no repeats allowed. ⚠️ But if you ask for more items than are in the list, it will raise an error! 🎲 choices() is totally okay with duplicates — you might see the same item twice (or more). #Python
English
0
0
0
29
Partager