Hello everyone, I encountered something strange when trying to perform some tuple comparison while using python.
In a python terminal I try and compare one tuple with another. I expect to get a boolean but I get another tuple? Here is what I enter:
However if I set the tuples as variables and compare them I get a boolean!Code:>>> 1,1 == 1,1 (1, True, 1) >>>
So I have away around the problem, but why was I getting that in the first place?Code:>>> a = 1,1 >>> b = 1,1 >>> a == b True >>>
Bookmarks