On Thu, Jan 21, 2010 at 1:57 AM, sudhir prasad <sudheer....@gmail.com> 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 - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor