mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 23:23:55 +00:00
Merge pull request #4521 from gregoryinouye/python-remove-duplicate-truthy-falsy-explanation
[python/en] remove duplicate truthy falsy explanation
This commit is contained in:
commit
0f97d7cc87
@ -165,15 +165,6 @@ None # => None
|
|||||||
"etc" is None # => False
|
"etc" is None # => False
|
||||||
None is None # => True
|
None is None # => True
|
||||||
|
|
||||||
# None, 0, and empty strings/lists/dicts/tuples/sets all evaluate to False.
|
|
||||||
# All other values are True
|
|
||||||
bool(0) # => False
|
|
||||||
bool("") # => False
|
|
||||||
bool([]) # => False
|
|
||||||
bool({}) # => False
|
|
||||||
bool(()) # => False
|
|
||||||
bool(set()) # => False
|
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
## 2. Variables and Collections
|
## 2. Variables and Collections
|
||||||
####################################################
|
####################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user