Skip to content

Instantly share code, notes, and snippets.

@eloidrai
Last active November 28, 2023 22:57
Show Gist options
  • Save eloidrai/a8e10cf47b2233017029f933b3e0c62c to your computer and use it in GitHub Desktop.
Save eloidrai/a8e10cf47b2233017029f933b3e0c62c to your computer and use it in GitHub Desktop.
from random import shuffle
# Il manque forcément des gens
participants = ["Ambre", "Arthur", "Théo", "Jeanne", "Gawry", "Antoine", "Océane", "Lisa", "Éloi", "Maëlyse"]
cadeau_a = participants.copy()
while any(p == c for p, c in zip(participants, cadeau_a)):
shuffle(cadeau_a)
for p, c in zip(participants, cadeau_a):
with open(f"{p.lower()}.txt", "w") as f:
f.write(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment