array, list, performance...

Christopher Armstrong radix at twistedmatrix.com
Thu Jun 6 10:13:37 EDT 2002


> Michael Chermside <mcherm at destiny.com> writes::
>   li[n] = x      assignment to the middle is O(len(li))

This doesn't seem right. Shouldn't that be O(1), just like
access-time?

-- 
                                Chris Armstrong
                         << radix at twistedmatrix.com >>
                http://twistedmatrix.com/users/carmstro.twistd/






More information about the Python-list mailing list