擅长:python、mysql、java
<p>可能你想要这样的东西:</p>
<pre><code>firstline = True
for row in kidfile:
if firstline: #skip first line
firstline = False
continue
# parse the line
</code></pre>
<p>另一种获得相同结果的方法是在循环之前调用<code>readline</code>:</p>
<pre><code>kidfile.readline() # skip the first line
for row in kidfile:
#parse the line
</code></pre>