DekGenius.com
[ Team LiB ] Previous Section Next Section

15.2 Boolean Operators

The second operand, but not the first, will be coerced from a string or an integer, or a list of one string or one integer, to a boolean. Either operand will be coerced from a list of one boolean to a boolean.

andlogical and

Syntax

boolean1 and boolean2

Description

Returns true if both operands are true. If the first operand is false, the second operand won't even be evaluated ("short-circuiting").

orlogical or

Syntax

boolean1 or boolean2

Description

Returns false if both operands are false. If the first operand is true, the second operand won't even be evaluated ("short-circuiting").

notlogical not

Syntax

not boolean

Description

Changes true to false and false to true.

    [ Team LiB ] Previous Section Next Section