2. Chained comparison operators
Some chained comparisons, like the one below, should be avoided. Notice the use of and?
2.1. Don’t do this
1x = 10 2y = 15 3z = 20 4 5if x <= y and y <= z: 6 print('hi')
2.2. Do this
1if x <= y <= z: 2 print('hi')