Last active
November 14, 2016 23:05
-
-
Save markdcummings/1b1c7408a76b896492b5fcb432dcb8e8 to your computer and use it in GitHub Desktop.
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 | |
players = ['Garry', 'Joanna', 'Sara', 'Mark', 'Phil', 'Tom'] | |
houses = ['Stark', 'Greyjoy', 'Dorne', 'Tyrell', 'Lannister', 'Baratheon'] | |
random.shuffle(houses) | |
for (player, house) in zip(players, houses): | |
print('%(player)s is assigned house %(house)s' % | |
{'player': player, 'house': house}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is much better. I didn't think to use
zip
. I like it!