On Feb 4, 7:41 am, "Ruan" <[EMAIL PROTECTED]> wrote:
> Then how about Python's list?
>
> What is done exactly when list.append is executed?
>
> For list, is there another larger list initialized and the contents from the
> old list is copied to it together with the new appended list?
>

Qi ren you tian :-)

Llike with dictionaries, some spare space is left each time the list
is expanded, so over-all the amortised cost is O(n).

HTH,

John





-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to