可能您想要这样的东西:
firstline = Truefor row in kidfile: if firstline: #skip first line firstline = False continue # parse the line
获得相同结果的另一种方法是
readline在循环之前调用:
kidfile.readline() # skip the first linefor row in kidfile: #parse the line

可能您想要这样的东西:
firstline = Truefor row in kidfile: if firstline: #skip first line firstline = False continue # parse the line
获得相同结果的另一种方法是
readline在循环之前调用:
kidfile.readline() # skip the first linefor row in kidfile: #parse the line