急,各位,请问倒数第二行那个命令,如何让“F,”和“list[j]”与后面的line成一行
inputfile_path = ("D:\\桌面\\force分解未排\\" + str(i)+"度FJWP\\" + str(i) +"force分解未排" + str(j) + ".txt")
with open(inputfile_path,'r') as f:
lines = f.readlines()
f=open(outputfolder_path + "\\" + str(i) + ".txt" ,'a')
for index,line in enumerate(lines):
if index == k:
linecomplete = "F," + list[j] + lines
f.writelines(linecomplete)