I'm testing the tuple structure, and I found it's strange when I use the ==
operator like:
>>> (1,) == 1,
Out: (False,)
When I assign these two expressions to a variable, the result is true:
>>> a = (1,)
>>> b = 1,
>>> a==b
Out: True
This questions is different from Python tuple trailing comma syntax rule in my view. I ask the group of expressions between ==
operator.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…