Skip to content

Instantly share code, notes, and snippets.

@ILikePizza555
Last active April 19, 2017 01:46
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 ILikePizza555/a3ea6bef719c76c83a46759217069183 to your computer and use it in GitHub Desktop.
Save ILikePizza555/a3ea6bef719c76c83a46759217069183 to your computer and use it in GitHub Desktop.
Solution for the card shuffle project
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