import random

deck = []
for suit in ('club', 'diamond', 'heart', 'spade'):
    for rank in range(1, 14):
        deck.append({'suit': suit, 'rank': rank})

player_hand = []
player_hand.append(deck.pop(random.randrange(len(deck))))
player_hand.append(deck.pop(random.randrange(len(deck))))

dealer_hand = []
dealer_hand.append(deck.pop(random.randrange(len(deck))))
dealer_hand.append(deck.pop(random.randrange(len(deck))))

def draw():
    screen.fill((0, 0, 0))

    output = []

    output.append('Player hand:')
    for card in player_hand:
        output.append('suit: ' + card['suit'] + ', rank: ' + str(card['rank']))

    output.append('')

    output.append('Dealer hand:')
    for card in dealer_hand:
        output.append('suit: ' + card['suit'] + ', rank: ' + str(card['rank']))

    screen.draw.text('\n'.join(output), (15, 15))