why () is () and [] is [] work in other way?

Roy Smith roy at panix.com
Fri Apr 20 20:01:37 EDT 2012


In article <877gxajit0.fsf at dpt-info.u-strasbg.fr>,
 Alain Ketterlin <alain at dpt-info.u-strasbg.fr> wrote:

> Tuples are immutable, while lists are not.

If you really want to have fun, consider this classic paradox:

>>> [] is []
False
>>> id([]) == id([])
True



More information about the Python-list mailing list