# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np

suits = ['hearts', 'diamonds', 'spades', 'clubs']
ranks = ['Ace', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King']
cards = [rank + '-' + suit for rank in ranks for suit in suits]

print(np.random.choice(cards, size=5, replace=False))

print(np.random.choice(cards, size=5, replace=False)) 


def deal_hands():
    drawn_cards = np.random.choice(cards, size=10, replace=False)
    hand_1 = drawn_cards[:5].tolist()
    hand_2 = drawn_cards[5:].tolist()
    return hand_1, hand_2


deal_hands()


def deal_hands2():
    drawn_cards = np.random.choice(cards, size=10, replace=True)
    hand_1 = drawn_cards[:5].tolist()
    hand_2 = drawn_cards[5:].tolist()
    return hand_1, hand_2


np.random.seed(2)
deal_hands2()





StarcoderdataJupyterScriptsDedupFiltered