Skip to content

Instantly share code, notes, and snippets.

@Paulius11
Created February 21, 2023 07:18
Show Gist options
  • Save Paulius11/07eab084518976bbfa5aef2307702241 to your computer and use it in GitHub Desktop.
Save Paulius11/07eab084518976bbfa5aef2307702241 to your computer and use it in GitHub Desktop.
Python create deck of cards
from pprint import pprint
from itertools import product
suits = ['♠️', '♣️', '♥️', '♦️']
values = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'jack', 'queen', 'king', 'ace']
deck = list(product(suits, values))
pprint(deck, compact=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment