insertion in lists
xpythonist at yahoo.com.br
Wed Mar 3 20:50:20 CET 2004
I'm not sure if I understand your question, but I think you forgot
to make list a list itself:
>>> element = 1 ## 1 or whatever
>>> list = 
>>> list.insert(0, )
>>> list.insert(0, element)
Now, we have list = element...
--- Lupe <luis_ at iname.com> escreveu:
> I'm trying to have a kind of multi-dimensional list which seems to me
> to be
> the best way to have an array of not known extension, at the begining
> the program.
> if I have:
> list 
> and want to have list
> how can I insert the element to that list, for example?
> just to put things clearer, if I wanted to insert the element in
> list I
> could do list.insert(0,element).
> I've tried list.insert(0,element) but gives me an error.
Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora:
More information about the Python-list