Just use the second example. This is more pythonic and better to read.
If the min/max value should be outside of the range, use the < operator instead.
if min_val <= current_val <= max_val: passThis allows also current_val == min_val or current_val == max_val.
If the min/max value should be outside of the range, use the < operator instead.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!