Lie wrote:
how does doing something twice not change complexity? yes it maybe belongs to the same complexity-class but is still twice as slow no?Who is doing something twice? Definitely not sum().
nobody's claiming that -- but as mentioned above, even if sum() had done two passes over the source sequence, it'd still be O(n).
</F> -- http://mail.python.org/mailman/listinfo/python-list