Le Wed, 27 Jan 2010 02:20:53 -0800, Floris Bruynooghe a écrit : > > Is a list or tuple better or more efficient in these situations?
Tuples are faster to allocate (they are allocated in one single step) and quite a bit smaller too. In some situations, in Python 2.7 and 3.1, they can also be ignored by the garbage collector, yielding faster collections. (not to mention that they are hashable, which can be useful) -- http://mail.python.org/mailman/listinfo/python-list