Last active
August 29, 2015 14:11
-
-
Save gregorykremler/6bc64e551ee33a7c91fd to your computer and use it in GitHub Desktop.
Generates secret santa list for Enigma.
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import random | |
TEAM_MEMBERS = [ | |
'Marc DaCosta', | |
'Craig Danton', | |
'Mike Flowers', | |
'Hicham Oudghiri', | |
'Brian Abelson', | |
'Michael Benoit', | |
'Clemente Cuevas', | |
'Raluca Dragusanu', | |
'Jeremy Bronfman', | |
'Ben Gelb', | |
'Matt Horan', | |
'Courtney Johnson', | |
'Ken Keiter', | |
'Gregory Kremler', | |
'Jeremy Krinsley', | |
'Destine Özuygur', | |
'Jarrod Parker', | |
'Brian Seitz', | |
'Jeremy Ulman', | |
'Byron Wong' | |
] | |
def gen_santas(lst): | |
"""Randomly associate pairwise elements.""" | |
lst_copy = lst[:] | |
random.shuffle(lst_copy) | |
secret_santas = zip(TEAM_MEMBERS, lst_copy) | |
for gifter, giftee in secret_santas: | |
print "{} is a secrect santa for {}.".format(gifter, giftee) | |
def main(): | |
gen_santas(TEAM_MEMBERS) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment