I am trying to create new folders using dictionary keys. The code is:
os.mkdir("Y:\Bleeding-study\MIMIC\Notes\randombins")
for key in index:
os.mkdir("Y:\Bleeding-study\MIMIC\Notes\randombins\batch_%s"%str(key))
os.mkdir("Y:\Bleeding-study\MIMIC\Notes\randombins\batch_%s\%s"%(str(key),"config"))
os.mkdir("Y:\Bleeding-study\MIMIC\Notes\randombins\batch_%s\corpus"%str(key))
The error is:
WindowsError: [Error 3] The system cannot find the path specified: 'Y:\Bleeding-study\MIMIC\Notes\randombins\batch_0\'
I thought this code would create that file pathname, so why is it giving this error?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…