Dick Moores wrote: > >>> () is () > True > >>> (1,) is (1,) > False > > Why? >
>>> a = () >>> b = () >>> c = (1,) >>> d = (1,) >>> a is b True >>> c is d False >>> id(a) 3086553132 >>> id(b) 3086553132 >>> id(c) 3086411340 >>> id(d) 3086390892 There is only one empty tuple. Does that clear it up for you? > Thanks, > > Dick Moores > > -- http://mail.python.org/mailman/listinfo/python-list