python check if a directory exists if not create it code example
Example: python make directory if not exists
try:
os.makedirs("path/to/directory")
except FileExistsError:
# directory already exists
pass
try:
os.makedirs("path/to/directory")
except FileExistsError:
# directory already exists
pass