lists and sequences

Michal Vitecek fuf at mageo.cz
Tue Oct 15 08:29:47 EDT 2002


Tim Peters wrote:
>[Collin Monahan]
>> What is a python list? Is it a linked list or a random access structure
>> in contiguous memory?
>> E.g. when does n^2 time happen using it?
>
>alist.insert(0, newthing) physically moves len(alist) elements.  Ditto
>alist.pop(0).

 why ditto for alist.pop(0)? is it because there can be multiple
 references to the same list/address?

    thank you,
-- 
		fuf		(fuf at mageo.cz)




More information about the Python-list mailing list