List insertion cost

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

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)?


More information about the Python-list mailing list