dumb newbie list question

Dietmar Lang dietmar at wohnheim.fh-wedel.de
Mon Aug 20 10:29:35 EDT 2001


Hi again,

> > > Maybe this is a naive/stupid question, but is there anyway to grow a
> list to an
> > > arbitrary size?  Eg.:
> > > >>> l = [1, 2, 3]
> > > >>> l[5] = "x"
> > I believe l.append("x") ist what you're looking for.
> That would make l[3] be 'x', rather than l[5] as the original poster
> asks.  To get 'x' into l[5], something must be placed in l[3] and
> l[4] as well, e.g.:
[good solution]

You're right, I think I was a bit too fast to answer on that one ;-)

Kudos, Dietmar



More information about the Python-list mailing list