Operators and functions for working with boolean (bool type) are described here.
int( bool b ) int
str( bool b ) str
Operator
Result
Description
bool && bool
bool
Logical AND operator. If both the operands are true then condition becomes true.
bool || bool
Logical OR Operator. If any of the two operands is true then condition becomes true.
! bool
Logical NOT Operator.
bool = bool
Assignment operator.
The int function returns 1 if the parameter is true and returns 0 otherwise.
The str function returns the "true" if the parameter is true and returns the "false" otherwise.
Last updated 6 years ago
Was this helpful?