Following
values are considered False.
a.
None
b.
False
c.
Zero
of any numeric type, like 0, 0.0, 0j
d.
Any
empty sequences like [], (), ‘’
e.
Any
empty mappings like {}
f.
If
user defined class defines a __bool__() or __len__() method, when that method
returns the integer zero or bool value False.
Remaining
all values considered to be True values.
No comments:
Post a Comment