Skip to content

Instantly share code, notes, and snippets.

@gkocjan
Created December 3, 2019 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkocjan/9a5e52a543c87d10b9ce7edae734c8b4 to your computer and use it in GitHub Desktop.
Save gkocjan/9a5e52a543c87d10b9ce7edae734c8b4 to your computer and use it in GitHub Desktop.
secret_santa_original.py
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