List Behavior when inserting new items
Drew
olsonas at gmail.com
Mon Jan 29 16:13:12 EST 2007
More information about the Python-list mailing list
Mon Jan 29 16:13:12 EST 2007
- Previous message (by thread): List Behavior when inserting new items
- Next message (by thread): List Behavior when inserting new items
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> > Is there any way to produce this kind of behavior easily?Hints: > >>> [None] * 5 > [None, None, None, None, None] > >>> [1, 2, 3, None] + [10] > [1, 2, 3, None, 10] > > HTH That is exactly what I was looking for. I'm actually working on some problems at http://codgolf.com. I find it helps me to learn a language and I'm coming from ruby where arrays have subtle differences from python's lists. Thanks for all the helpful responses.
- Previous message (by thread): List Behavior when inserting new items
- Next message (by thread): List Behavior when inserting new items
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list