Logical operators
All logical operators interpret the operands logically and return True
(-1) or False (0) as result.
Logical operators
Operator |
Description |
not
|
Logical inverse. One of the few unary operators.
The operation returns the logical inverse of the operand. |
and
|
Logical and. The operation returns the logical
and of the operands. |
or
|
Logical or. The operation returns the logical
or of the operands. |
Xor
|
Logical exclusive or. The operation returns
the logical exclusive or of the operands. I.e. like logical or, but with
the difference that the result is False if both operands are True. |