能力值:
( LV1,RANK:0 )
|
-
-
2 楼
import os def creDir(): ''' 数字前补0创建文件夹002,003... ''' root = 'E:\\数据集\\Gaze\\' i = 1 for j in range(22): k = "%03d" % i file_name = root + str(k) os.mkdir(file_name) i=i+1
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
只需要 改成
with open("{0}{1}.{2}".format(srcpath,dstFile,("%03d" % i + 1)),'wb+') as f_dest:
或者
with open("{0}{1}.{:0>3d}".format(srcpath,dstFile,count + 1),'wb+') as f_dest:
最后于 2020-10-28 16:03
被微启宇编辑
,原因:
|
|
|