最佳答案
In Python (I checked only with Python 3.6 but I believe it should hold for many of the previous versions as well):
(0, 0) == 0, 0 # results in a two element tuple: (False, 0)
0, 0 == (0, 0) # results in a two element tuple: (0, False)
(0, 0) == (0, 0) # results in a boolean True
But:
a = 0, 0
b = (0, 0)
a == b # results in a boolean True
Why does the result differ between the two approaches? Does the equality operator handle tuples differently?