Q:

create multiple folders in python automatically

I want to create a path like C:\sample\sample1\hello.py.  It should automatically create the complete path from sample to hello.py, and all the directories in between.  Is this possible in Python?

A:

The following functions may help:

os.makedirs
os.path.dirname
os.path.basename

