Data structures · How fast is it?

What Python's operations cost

One innocent-looking line, such as x in xs, can hide a whole loop, and inside another loop it turns linear work quadratic.