The following are defined as having false values in Python : Boolean « Data Type « Python Tutorial






None
False (Boolean)
Any numeric zero:
0 (integer)
0.0 (float)
0L (long integer)
0.0+0.0j (complex)
"" (empty string)
[] (empty list)
() (empty tuple)
{} (empty dictionary)








2.1.Boolean
2.1.1.true and false value
2.1.2.Python accepted almost anything in a boolean context
2.1.3.The following are defined as having false values in Python
2.1.4.using Booleans numerically