在python中自动创建多个文件夹

gow*_*ham 3 python file creation

我想创建一个像C:\sample\sample1\hello.py. 它应该自动创建从sampleto的完整路径hello.py,以及它们之间的所有目录。这在 Python 中可能吗?

Sjo*_*erd 6

以下功能可能会有所帮助: