Skip to content

Instantly share code, notes, and snippets.

@pv8
Created January 11, 2022 18:57
Show Gist options
  • Save pv8/fad87ee532647cd5e747606c359128dc to your computer and use it in GitHub Desktop.
Save pv8/fad87ee532647cd5e747606c359128dc to your computer and use it in GitHub Desktop.
List randomizer
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