对于我的循环来实现的,我需要给作为文件的名称“我的迭代次数”,例如,我们的目标是节省:如何给文件命名?
my first iteration in the first file.
my second iteration in the second file.
....
我使用该库numpy,但我的代码并没有给我我需要的解决方案,事实上我的实际代码迫使我在每次迭代之后输入文件的名称,这很容易,如果我有6或7次迭代,但我在如果我有100次迭代,这是没有意义的:
for line, a in enumerate(Plaintxt_file):
#instruction
#result
fileName = raw_input()
if(fileName!='end'):
fileName = r'C:\\Users\\My_resul\\Win_My_Scripts\\'+fileName
np.save(fileName+'.npy',Result)
ser.close()
如果你能帮助我,我将不胜感激。
你的文件名是否有顺序给他们? – ANVGJSENGRDG