Last active
November 28, 2023 22:57
-
-
Save eloidrai/a8e10cf47b2233017029f933b3e0c62c to your computer and use it in GitHub Desktop.
This file contains 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
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