From adc474c4c95ea18f12cab5e7d5c7d57598f0f18e Mon Sep 17 00:00:00 2001 From: Stephan Spindler <25225092+s-spindler@users.noreply.github.com> Date: Wed, 27 Jul 2022 21:38:53 +0200 Subject: Add sets to empty things that are false --- python.html.markdown | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'python.html.markdown') 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 -- cgit v1.2.3