擅长:python、mysql、java
<p>在锁定步骤中(对于Python≥3):</p>
<pre><code>for line1, line2 in zip(file1, file2):
# etc.
</code></pre>
<p>作为“二维阵列”:</p>
<pre><code>for line1 in file1:
for line2 in file2:
# etc.
# you may need to rewind file2 to the beginning.
</code></pre>