2. Chained comparison operators

Avoid splitting simple chained comparisons with and when Python can express them directly.

The chained form matches the mathematical idea directly and avoids repeating the middle operand. That reduces visual noise and makes boundary checks easier to audit during review.

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')