Skip to content

Instantly share code, notes, and snippets.

@zimolzak
Created February 14, 2017 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zimolzak/0b41b7d8cd6b43540d6e6993e7018ae3 to your computer and use it in GitHub Desktop.
Save zimolzak/0b41b7d8cd6b43540d6e6993e7018ae3 to your computer and use it in GitHub Desktop.
Construct deck of only broadway cards. Draw 3 without replacement. 6840 seqs, 12.7 bits entropy.
from random import sample
from itertools import product
 
p = product(['A', 'K', 'Q', 'J', 'T'],
['s', 'h', 'd', 'c'])
 
deck = [''.join(e) for e in p]
 
print(sample(deck, 3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment