Using the While Loop

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


Brillant! Thank you!

In article <NQMW6.184822$p33.3785125 at news1.sttls1.wa.home.com>, "Greg
Jorgensen" <gregj at pobox.com> 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 =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list