Skip to content

Random card from a deck – Logic in Python


import random

deck = list(range(1, 53))

hand = random.sample(deck, k=5)

See also  String formatting in Python

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.