File tree 2 files changed +6
-0
lines changed
Filter options
2 files changed +6
-0
lines changed
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ A collection of useful snippets using only the standard library.
14
14
| builtins_manipulation | Illustrates the easy overriding/manipulation of built-in functions |
15
15
| capture_output | Capture the output of a function generally directing to stdout |
16
16
| chained_assignments | Assign a value to multiple variables using chained assignments |
17
+ | chained_comparison | Chain comparisons to have more math-like comparisons |
17
18
| check_pattern | Check for multiple string patterns |
18
19
| compare_strings | Use ` difflib.SequenceMatcher ` to compare strings |
19
20
| count_thresholds | Count the number of elements between certain thresholds |
Original file line number Diff line number Diff line change
1
+ x = 13
2
+ lower_bound , upper_bound = 10 , 20
3
+ print (lower_bound , upper_bound )
4
+ print (x > lower_bound and x < upper_bound )
5
+ print (lower_bound < x < upper_bound )
You can’t perform that action at this time.
0 commit comments