deck = [] for suit in ('club', 'diamond', 'heart', 'spade'): for rank in range(1, 14): deck.append({'suit': suit, 'rank': rank}) # Temporary print('suit: ' + suit + ', rank: ' + str(rank)) # Temporary print('Total number of cards in deck: ' + str(len(deck)))