looping over a big file

Roy Smith roy at panix.com
Sun Jul 3 18:13:44 EDT 2005


Jp Calderone <exarkun at divmod.com> wrote:

> Yes, but you need to do it like this:
> 
>   fileIter = iter(big_file)
>   for line in fileIter:
>       line_after = fileIter.next()

That's better than the solution I posted.



More information about the Python-list mailing list