Using the While Loop

Mike Johnson ffp_randjohnson at
Sat Jun 16 13:49:20 EDT 2001

Brillant! Thank you!

In article <NQMW6.184822$p33.3785125 at>, "Greg
Jorgensen" <gregj at> wrote:

> Python assignments are statements, not expressions. You are probably
> used to C, C++, or Java. In Python the statement "line =
> myfile.readline()" is not an expression and doesn't have a value, so
> it's not syntactically valid following if or while. Your second example
> is the canonical Python form for reading lines sequentially from a file.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

More information about the Python-list mailing list