6.6. Boolean Logic

6.6.1. Positive and Negative Values

Negative values:

  • empty bool() or False

  • empty int() or 0

  • empty float() or 0.0

  • empty complex() or 0+0j or 0.0+0.0j

  • empty str() or ''

  • empty tuple() or ()

  • empty list() or []

  • empty set()

  • empty frozenset()

  • empty dict() or {}

  • None

Positive values:

  • any other

6.6.2. Assignments