-
-
Save gkocjan/9a5e52a543c87d10b9ce7edae734c8b4 to your computer and use it in GitHub Desktop.
secret_santa_original.py
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
import random | |
osoby = ['marek', 'przemek', 'michał', 'kamila'] | |
osoby2 = ['marek', 'przemek', 'michał', 'kamila'] | |
random.shuffle(osoby) | |
random.shuffle(osoby2) | |
for osoby, osoby2 in zip(osoby, osoby2): | |
if osoby != osoby2: | |
print(f'{osoby} kupuje prezent dla {osoby2}') | |
elif osoby == osoby2: | |
random.shuffle(osoby) | |
random.shuffle(osoby2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment