The REALLY bad thing about Python lists ..

Mike Coffin mhc at Eng.Sun.COM
Sun May 14 16:19:52 EDT 2000

Michael Hudson <mwh21 at> writes:

> So create it by appending n elements and then reverse it... this is
> still n^2, I guess, but for the numbers you can deal with before the
> universe dies a heat death, this will be vastly quicker than anything
> else you can do in Python.

Reversing a list is not N^2, it's linear in N.


More information about the Python-list mailing list