import random
# Build ordered deck
deck = []
for rank in ['Ace', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Jack', 'Queen', 'King']:
for suit in ['Hearts', 'Diamonds', 'Clubs', 'Spades']:
deck.append(rank + ' of ' + suit)
deck.append('Black Joker')
deck.append('Red Joker')
# Shuffle deck (LIKE MAGIC BABY)
random.shuffle(deck)
# Lay out cards
for card in deck:
print cardfor rank in ['Ace', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'Jack', 'Queen', 'King']:« Older She’s an Iron Chef. The Executive Chef of Bon App... | Eileen Nearne was found dead i... Newer »
This thread has been archived and is closed to new comments
(In reality, I can shuffle in almost no ways, because I have very little dexterity. Although if someone told me that Persi Diaconis could shuffle cards into an arbitrary order, I'd almost believe it.)
posted by madcaptenor at 12:02 PM on September 15, 2010