summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNiels Bom <niels@nielsbom.com>2018-11-30 11:52:37 +0100
committerGitHub <noreply@github.com>2018-11-30 11:52:37 +0100
commit4a891817ee54fb66cdf793990350f2370c70728d (patch)
tree681855b1387dfb1f1b23b8e28757dca1cba606bf
parentb93ea7add75f774fd7d1f2b450a3517ea924bff4 (diff)
[python3/en] show chaining operators nicer
-rw-r--r--python3.html.markdown5
1 files changed, 4 insertions, 1 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index c7fbf342..ff527716 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -96,7 +96,10 @@ False or True # => 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