pythonian way

Remco Gerlich scarblac-spamtrap at pino.selwerd.nl
Fri Feb 25 03:28:30 EST 2000


Remco Gerlich should have written:
> A = []
> while 1:
>     line = H.readline()
>     if not line:
>         break
>     if line != '\n':
>         A.append(line)

Bad editor! Bad bad bad!

(whitespace was wrong - never edit Python in an editor that thinks it's
editing Text...)

-- 
Remco Gerlich,  scarblac at pino.selwerd.nl
  9:23am  up 93 days, 15:27,  7 users,  load average: 0.09, 0.05, 0.07



More information about the Python-list mailing list