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)
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to