Python Crear directorio si no existe

import os
if not os.path.exists('my_folder'):
    os.makedirs('my_folder')
    
#You can also use the python idiom EAFP: 
#Easier to ask for forgiveness than permission. For example,

try:
    os.makedirs('my_folder')
except OSError as e:
    if e.errno != errno.EEXIST:
        raise
Real Raccoon