Standard Type Boolean Operators : Boolean Operators « Operator « Python Tutorial






x, y = 3.1415926536, -1024
print x < 5.0
print not (x < 5.0)
print (x < 5.0) or (y > 2.718281828)
print (x < 5.0) and (y > 2.718281828)
print not (x is y)








4.3.Boolean Operators
4.3.1.Boolean Operators
4.3.2.Understanding the Peculiar Nature of and and or
4.3.3.Introducing or
4.3.4.logically combine the Boolean results
4.3.5.Standard Type Boolean Operators