我试图建立一个年目录结构, 包含代表月的子目录, 即 月。
- 2012
- 01
- 02
- 03
我的代码是这样的:
newpath = "test"
for year in range(2000, 2013):
for month in range(1, 13):
newpath += str(year)+ \ +str(month)
if not os.path.exists(newpath):
os.makedirs(newpath)
我搞错了
OSError: [Errno 2] No such file or directory: test\2000\1
Would someone please have some information on this Thank you