List insertion cost

Lucas P Melo lukepadawan at gmail.com
Tue Jul 21 15:21:50 EDT 2009


Hello,
I would like to know how much it costs to insert an element into a list 
using this operation:
a[2:2] = [ 1 ]
i. e, what is the complexity of the operation above (given that len(a) = n)?

Thanks.



More information about the Python-list mailing list