File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 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.
1414| builtins_manipulation | Illustrates the easy overriding/manipulation of built-in functions |
1515| capture_output | Capture the output of a function generally directing to stdout |
1616| chained_assignments | Assign a value to multiple variables using chained assignments |
17+ | chained_comparison | Chain comparisons to have more math-like comparisons |
1718| check_pattern | Check for multiple string patterns |
1819| compare_strings | Use ` difflib.SequenceMatcher ` to compare strings |
1920| 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