On Thu, Dec 24, 2009 at 12:50 PM, Praveen Kumar <praveen.python.pl...@gmail.com> wrote: > O(n) is O(n) is O(n)... Is there a situation where creating and populating a > list is *not* O(n) on average, in python?
"In theory, theory and practice are the same. In practice, they are not." In other words, constants matter. Also, the link I had posted earlier [1], shows that tuple creation is O(1), (at least when it is populated with literals). [1] http://stackoverflow.com/questions/68630/are-tuples-more-efficient-than-lists-in-python -- Roshan Mathews http://teamtalk.im _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers