summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDivay Prakash <divayprakash@users.noreply.github.com>2018-12-01 10:00:58 +0530
committerGitHub <noreply@github.com>2018-12-01 10:00:58 +0530
commit1fd955ae6479650b987a54a93b09507bfdf06954 (patch)
treef75c300c92d40e29bf59f83775aec019b45e56e7
parent609abd33284284a487f1ac3bd0a6898ed6a77267 (diff)
parent4a891817ee54fb66cdf793990350f2370c70728d (diff)
Merge pull request #3413 from nielsbom/patch-2
[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 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