無論出於何種原因,我的代碼未在第85行中輸入'for'循環。未輸入'for'循環? Python2.7
文件input_fileA已打開。有誰知道爲什麼?這是python 2.7。
84 if (counter_shiftA == counter_shiftB):
85 for line in input_fileA:
86 print line
87 if shiftBEntryA.strip() in line:
88 print "Hit a matched line"
89 counter1 += 1
90 flag = True
91 output_file.write(line)
92 elif shiftEEntryA.strip() in line:
93 output_file.write(line)
94 break
95 elif flag:
96 output_file.write(line)
什麼是input_fileA的聲明? –
'counter_shiftA == counter_shiftB'評估爲'True'嗎? – zwer
'input_fileA'已經用盡了嗎?還是空的? –