mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
[python3/en] Add empty tuple to "False if evaluated" list (#2587)
This commit is contained in:
parent
52bbc81520
commit
d0918b2576
@ -143,13 +143,13 @@ None # => None
|
||||
"etc" is None # => False
|
||||
None is None # => True
|
||||
|
||||
# None, 0, and empty strings/lists/dicts all evaluate to False.
|
||||
# None, 0, and empty strings/lists/dicts/tuples all evaluate to False.
|
||||
# All other values are True
|
||||
bool(0) # => False
|
||||
bool("") # => False
|
||||
bool([]) # => False
|
||||
bool({}) # => False
|
||||
|
||||
bool(()) # => False
|
||||
|
||||
####################################################
|
||||
## 2. Variables and Collections
|
||||
|
Loading…
Reference in New Issue
Block a user