do...while loops

jurgen.defurne at philips.com jurgen.defurne at philips.com
Tue Feb 6 08:27:14 EST 2001


If I can't use readlines, I usually do it like this :

fh = open(...)

line = fh.readline()
while line:
    # Process line here
    line = fh.readline()

No break necessary...

Jurgen



More information about the Python-list mailing list