diff options
author | Niels Bom <niels@nielsbom.com> | 2018-11-30 11:52:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 11:52:37 +0100 |
commit | 4a891817ee54fb66cdf793990350f2370c70728d (patch) | |
tree | 681855b1387dfb1f1b23b8e28757dca1cba606bf | |
parent | b93ea7add75f774fd7d1f2b450a3517ea924bff4 (diff) |
[python3/en] show chaining operators nicer
-rw-r--r-- | python3.html.markdown | 5 |
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 |