Last active
April 19, 2017 01:46
-
-
Save ILikePizza555/a3ea6bef719c76c83a46759217069183 to your computer and use it in GitHub Desktop.
Solution for the card shuffle project
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 | |
suits = ("diamonds", "hearts", "clubs", "spades") | |
ranks = tuple(range(1, 14)) | |
cards = [] | |
#Generate the cards | |
for s in suits: | |
for r in ranks: | |
cards.append((s, r)) | |
random.shuffle(cards) | |
for card in cards: | |
print(card) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment