PYTHON_101 | PYTHON LOGICAL OPERATORS
SMARS Learning Platform
89% Complete
PYTHON_101 | PYTHON LOGICAL OPERATORS
Operator | Description | Example | |
---|---|---|---|
and |
Logical AND | If both the operands are true then condition becomes true. | (a and b) is true. |
or |
Logical OR | If any of the two operands are non-zero then condition becomes true. | (a or b) is true. |
not |
Logical NOT | Used to reverse the logical state of its operand. | Not(a and b) is false. |