1.

Boolean Operators in Python

Answer»

The Table gives a list of boolean operators available in Python along with their functions:

OperatorWhat it does
andReturns True if both operands are True, else False
orReturns True if both operands are True, else False
notReturns value opposite to the Truth value of the expression

Examples:

# and operator
print(True and False)
False
# or operator
print(True or False)
True
# not operator
print(not False)
True


Discussion

No Comment Found