do...while

Aahz aahz at pythoncraft.com
Thu Jun 20 19:24:53 EDT 2002


In article <slrnah40l1.12v.msoulier at pmerd071.ca.nortel.com>,
Michael P. Soulier <msoulier at nortelnetworks.com_.nospam> wrote:
>
>    line = filehandle.readline()
>    while len(line) > 5:
>        line = filehandle.readline()

Use Python 2.2:

    for line in filehandle:
        if len(line) <= 5:
            break
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list