while var, but var ==16 != true

Jeffrey Froman jeffrey at fro.man
Mon Jul 14 22:10:45 CEST 2008

Tim Roberts wrote:

> Everything has a boolean value in
> Python.  0, None, False, '' (empty string), [] (empty list), () (empty
> tuple), and {} (empty dictionary) all have a False value.  Everything else
> has a True value.

Empty set objects also evaluate as false in a boolean context.


More information about the Python-list mailing list