looping over a big file

Roy Smith roy at panix.com
Mon Jul 4 00:13:44 CEST 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