diff options
author | Marcel Ribeiro Dantas, Ph.D <ribeirodantasdm@gmail.com> | 2022-07-28 10:14:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-28 10:14:55 +0200 |
commit | a6b18a9e2e4dee931bc038158d672d026e05c993 (patch) | |
tree | d30dfe70276e6a82c5966abc0260cf0932f9b7ab | |
parent | ae7233323b3d90c159abdfff56c4f85c77e16f33 (diff) | |
parent | adc474c4c95ea18f12cab5e7d5c7d57598f0f18e (diff) |
Merge pull request #4467 from s-spindler/patch-2
[python/en-us] add sets to empty things that are false
-rw-r--r-- | python.html.markdown | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/python.html.markdown b/python.html.markdown index 0bd16a80..e8c7110a 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -153,13 +153,14 @@ None # => None "etc" is None # => False None is None # => True -# None, 0, and empty strings/lists/dicts/tuples all evaluate to False. +# 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(0) # => False +bool("") # => False +bool([]) # => False +bool({}) # => False +bool(()) # => False +bool(set()) # => False #################################################### ## 2. Variables and Collections |