Nov-24-2020, 06:35 AM
You're asking if one number has a value between two others? I'd do that initially with the operators like
If they're all integers, you can also test it from a range, but that won't work for floats.
lower <= n <= upperI'm not sure this is what you meant by "confine"...
If they're all integers, you can also test it from a range, but that won't work for floats.
n in range(lower, upper + 1)