On Thu, Jan 21, 2010 at 1:57 AM, sudhir prasad <[email protected]> wrote: > hi, > is there any other way to keep track of line number in a file other than > fileinput.filelineno()
With enumerate():
for line_number, line in enumerate(open('myfile.txt')):
# etc
Kent
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
