'How a single parenthesis could change the output? [duplicate]

print(3 in [1, 2, 3] == [1, 2, 3])
#Output: True 

print((3 in [1, 2, 3]) == [1, 2, 3])
#Output: False

I'm just wondering what is happening here.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source