diff options
author | Stephan Spindler <25225092+s-spindler@users.noreply.github.com> | 2022-07-27 21:38:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-27 21:38:53 +0200 |
commit | adc474c4c95ea18f12cab5e7d5c7d57598f0f18e (patch) | |
tree | d30dfe70276e6a82c5966abc0260cf0932f9b7ab | |
parent | ae7233323b3d90c159abdfff56c4f85c77e16f33 (diff) |
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 |