Truth Values

suggest change

The following values are considered falsey, in that they evaluate to False when applied to a boolean operator.

All other values in Python evaluate to True.

Note: A common mistake is to simply check for the Falseness of an operation which returns different Falsey values where the difference matters. For example, using if foo() rather than the more explicit if foo() is None

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents