os.mkdirs()创建文件夹到“123” 转载:https://blog.csdn.net/gqixf/article/details/80180640 path_01 = 'Test\\path_01\\path_02\\path_03' os.mkdir()创建路径中的最后一级目录,即:只创建path_03目录,而如果之前的目录不存在并且也需要创建的话,就会报错。 os.makedirs()创建多层目录,即:Test,path_01,path_02,path_03如果都不存在的话,会自动创建