Created
June 10, 2021 13:56
-
-
Save AayushSameerShah/3029d7dd4a104b17b146f8a9b4c31c0c to your computer and use it in GitHub Desktop.
This is how to quickly make a deck of 52 cards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
series = pd.Series([], dtype= int) | |
for suite in ['H', 'D', 'S', 'C']: | |
for value, number in enumerate(['A'] + list(range(1, 11)) + ['J', 'Q', 'K']): | |
series = series.add(pd.Series({str(number) + suite: value + 1}), fill_value= 0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment