import os
os.mkdir("C:\\uers\\mike1\\desktop\\a")
for i in range(3):
name2 = "wenjina{0}".format(i)
name = "C:\\users\\mike1\\desktop\\a"
filename = name + "\\" + name2
os.mkdir(filename)
这样在一个文件夹中建立了几个子文件夹
2023-09-23 09:53:47
import os
os.mkdir("C:\\uers\\mike1\\desktop\\a")
for i in range(3):
name2 = "wenjina{0}".format(i)
name = "C:\\users\\mike1\\desktop\\a"
filename = name + "\\" + name2
os.mkdir(filename)
这样在一个文件夹中建立了几个子文件夹