Skip to content

Random card from a deck – Logic in Python

Advertisements

import random

deck = list(range(1, 53))

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

See also  Linked List Cycle II - Leetcode Challenge - Python Solution

Leave a Reply

Your email address will not be published. Required fields are marked *

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