I'm currently having a hard time understanding why the output of
1 is not '1' == True
is
False
The thing is when I'm inserting brackets like that:
1 is not ('1' == True)
(1 is not '1') == True
both return True
.
I get the second part, because 1, which is True, is not False, which is the result of the comparison of the string "1" and True. Furthermore, the integer 1 is not the string one, which is true and therefore equal to True. But as soon as I do not put any bracket, it returns False
. Why is that?