Created
January 11, 2022 18:57
-
-
Save pv8/fad87ee532647cd5e747606c359128dc to your computer and use it in GitHub Desktop.
List randomizer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
items = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'] | |
for position, idx in enumerate(random.sample(range(0, len(items)), len(items))): | |
print(position, items[idx]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment