Storing lines from a text file

Kirk McDonald mooquack at
Mon Jan 30 00:17:41 CET 2006

bradfordh at wrote:
> so this:
>     a, b, c, d, e =f.readlines()
> ..this will put the first line in a, second in b, etc? How do I
> accomplish this when I'm not sure how many lines there are going to be
> every time? Thanks.

With a list:

-Kirk McDonald

More information about the Python-list mailing list