[EMAIL PROTECTED] wrote:

> I would use a counter in a for loop using the readline method to
> iterate over the 20,000 line file. 

file objects are iterables themselves, so there's no need to do that
by using a method.

> Reset the counter every 5 lines/ iterations and close the file. 

I'd use a generator that fetches five lines of the file per
iteration and iterate over it instead of the file directly.

> Have fun!

Definitely -- and also do your homework yourself :)

Regards,


Björn

-- 
BOFH excuse #339:

manager in the cable duct

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to