summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index b3f89372..4d5bb3ae 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -105,7 +105,10 @@ bool(-6) # => True
2 <= 2 # => True
2 >= 2 # => True
-# Comparisons can be chained!
+# Seeing whether a value is in a range
+1 < 2 and 2 < 3 # => True
+2 < 3 and 3 < 2 # => False
+# Chaining makes this look nicer
1 < 2 < 3 # => True
2 < 3 < 2 # => False