我想打开几个文件并保存输出。这是我想为 {i}=76 files.txt 迭代编写脚本的操作。对于我想要操作的 76 个文件中的每一个,reference_file.txt 总是相同的。import numpy as npa=np.loadtxt('filename{i}.txt')b=np.loadtxt('reference_file.txt')np.savetxt('output{i}.txt', np.subtract(a,b))然后结束脚本。
添加回答
举报
0/150
提交
取消