1、mkdir()---》用于创建单个文件夹。 f=os.mkdir("e:\\wuxiaobing") 2、makedirs--》创建嵌套的文件夹 f=os.makedirs("e:\\wuxiaobing1\\1\\2\\")