Bob Gailer wrote:
> Duncan Gibson wrote:
>   
>> [snip]
>>     
>
>   
>> but I would like to record the line number in the file. 
>>   
>>     
> How about using enumerate():
>   
>>     for line_num, data in enumerate(reader):
>>         # print reader.line_num, data # SHOULD BE:
>>         print line_num, data
>>
>>
>>     
>   


-- 
Bob Gailer
510-978-4454

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to