Skip to content

Instantly share code, notes, and snippets.

@chrisking
Created August 28, 2018 15:22
Show Gist options
  • Select an option

  • Save chrisking/bc676b3a06c2031f97274db1526473ee to your computer and use it in GitHub Desktop.

Select an option

Save chrisking/bc676b3a06c2031f97274db1526473ee to your computer and use it in GitHub Desktop.
DIR_NAME = "./sorted_cards/"
cards = ['2','3','4','5','6','7','8','9','T','J','Q','K','A']
suits = ['s','c','h','d']
import os
for card in cards:
for suit in suits:
try:
os.mkdir(DIR_NAME+card+suit)
except Exception:
print("Directory already exists")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment