SyntaxFix
Write A Post
Hire A Developer
Questions
>>> () is () True >>> 1 is 1 True >>> (1,) == (1,) True >>> (1,) is (1,) False >>> a = (1,) >>> b = a >>> a is b True
Some objects are singletons, and thus is with them is equivalent to ==. Most are not.
is
==