code to parse a file

Nathan Clegg nathan at
Thu Feb 10 17:37:46 CET 2000

On 10-Feb-2000 Pedro Silva wrote:
>         for lines in f.readline():

I believe this is your mistake here.  If you use readline(), you will
be looping over the characters of a single line.  I think you want to
use readlines().

Nathan Clegg
 nathan at

More information about the Python-list mailing list