I expect this
print(False == True and not True)
to output True
, but it outputs False
instead.
Advertisement
Answer
code run from left. see these lines:
print(False == (True and not True)) # True >>> False == True False >>> not True False print(False == True and not True) # -> print(False and False) # False