Last active
November 13, 2016 16:23
-
-
Save garrypolley/a71f8bf00b4313b9d037faed4121d317 to your computer and use it in GitHub Desktop.
Determines who gets what house
This file contains hidden or 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 | |
people_playing = ['Garry', 'Joanna', 'Sara', 'Mark', 'Phil', 'Tom'] | |
families = ['Stark', 'Greyjoy', 'Dorne', 'Tyrell', 'Lannister', 'Baratheon'] | |
chosen_families = {} | |
for person in people_playing: | |
family = random.choice(families) | |
chosen_families[person] = family | |
families.remove(family) | |
for person, family in chosen_families.items(): | |
print(person, 'is assigned', family) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code Golf!
https://gist.github.com/codeweevil/22a171ef19072d9b156a0782c35cf453