ID EN
Operators

truth

Python 3.11

Return True if obj is true, and False otherwise. This is equivalent to using the bool constructor.

Syntax

PYTHON
operator.truth(obj)

See Also

True False bool