Pythonic love
Fillmore
fillmore_remove at hotmail.com
Mon Mar 7 17:51:36 EST 2016
learning Python from Perl here. Want to do things as Pythonicly as possible.
I am reading a TSV, but need to skip the first 5 lines. The following
works, but wonder if there's a more pythonc way to do things. Thanks
ctr = 0
with open(prfile,mode="rt",encoding='utf-8') as pfile:
for line in pfile:
ctr += 1
if ctr < 5:
continue
allVals = line.strip().split("\t")
print(allVals)
More information about the Python-list
mailing list