Logical Operators
Operator
Meaning
Example
Example
x = True
y = False
print(x and y) # False
print(x or y) # True
print(not x) # FalseTruth Tables
A
B
A and B
A
B
A or B
A
not A
Last updated
x = True
y = False
print(x and y) # False
print(x or y) # True
print(not x) # FalseLast updated