I am trying to list every card in a deck of cards (along with a number assigned to the card) using this code:
suitName = ("hearts", "diamonds", "spades", "clubs")
rankName = ("Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King")
def translate():
rank = ""
suit = ""
cards = ""
cardNum = 0
for x in rankName:
rank = x
for y in suitName:
suit = y
for i in range(0, NUMCARDS):
cards += rank
cards += " of "
cards += suit
cardNum = i
i += 1
print cardNum
print " "
print cards
My output is only getting "King of clubs" 52 times though. What do I need to do?