iterating over a file with two pointers

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Sep 18 22:40:23 EDT 2013


On Wed, 18 Sep 2013 05:14:23 -0700, nikhil Pandey wrote:

> I want to iterate in the inner loop by reading each line till some
> condition is met.how can i do that. Thanks for this code.

while not condition:
    read line


Re-write using Python syntax, and you are done.



-- 
Steven



More information about the Python-list mailing list