Comparing boolean values with == works in Python. But when I apply the boolean not operator, the result is a syntax error:
Python 2
I think what you are looking for is "and not". This gives you the results you are looking towards. If your comparing booleans what you have is a compound boolean expression, here is an example website Compound Boolean Expression.
>>> True and True
True
>>> True and not True
False
>>> True and not False
True
>>> False and not True
False
>>> False and not False
False
>>> False and False
False