Logical operators

All logical operators interpret the operands logically and return True (-1) or False (0) as result.

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.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?