List Behavior when inserting new items
Drew
olsonas at gmail.com
Mon Jan 29 14:10:45 EST 2007
> What is your actual usecase?
>
> diez
The issue is that I don't know how long the list will eventually be.
Essentially I'm trying to use a 2D list to hold lines that I will
eventually print to the screen. Blank elements in the list will be
printed as spaces. I suppose every time I add an element, I could find
the difference between the size of the list and the desired index and
fill in the range between with " " values, however I just wanted to
see if there was a more natural way in the language.
Thanks,
Drew
More information about the Python-list
mailing list