falsy python

Solutions on MaxInterview for falsy python by the best coders in the world

showing results for - "falsy python"
Beatrice
17 May 2018
1None
2False
30
40.0
50j
6Decimal(0)
7Fraction(0, 1)
8[] - an empty list
9{} - an empty dict
10() - an empty tuple
11'' - an empty str
12b'' - an empty bytes
13set() - an empty set
14an empty range, like range(0)
15objects for which
16obj.__bool__() returns False
17obj.__len__() returns 0