[python3/en] show chaining operators nicer

This commit is contained in:
Niels Bom 2018-11-30 11:52:37 +01:00 committed by GitHub
parent b93ea7add7
commit 4a891817ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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