Python Success Stories or Nightmares

James Kew james.kew at btinternet.com
Sat Feb 1 10:38:58 EST 2003


Grzegorz Adam Hankiewicz wrote:
>   while (line = file.readline()):
>
> I still miss that one-liner.

Doesn't

for line in file:          # or file.xreadlines() or file.readlines() in
earlier Python versions

do the same thing in just as few lines?

--
James Kew
james.kew at btinternet.com






More information about the Python-list mailing list