Logical operators are the and, or, not operators.
Example :
a = True
b = False
print('a and b is',a and b)
print('a or b is',a or b)
print('not a is',not a)
b = False
print('a and b is',a and b)
print('a or b is',a or b)
print('not a is',not a)
Output:
x and y is false
x or y is true
not x is false
No comments:
Post a Comment