Creating a directory (requires Python 3.5+)
import pathlib
pathlib.Path('/my/directory').mkdir(parents=True, exist_ok=True)