- True
True == 1
True
- False
False == 0
True
- True + True
True + True
2
- None
None == None
True
# Python code to demonstrate
# True, False, None, and, or , not
# showing that None is not equal to 0
# prints False as its false.
print (None == 0)
# showing objective of None
# two None value equated to None
# here x and y both are null
# hence true
x = None
y = None
print (x == y)
# showing logical operation
# or (returns True)
print (True or False)
# showing logical operation
# and (returns False)
print (False and True)
# showing logical operation
# not (returns False)
print (not True)
False
True
True
False
False