So I'm trying to write a function that says if x is less than lo, return low; returns hi if x is greater than hi; and returns x otherwise. How would I write that without using conditionals, only using the min and max functions. So far I have the first two statements down:
print max(x, lo)
print min(x, hi)
However, I just can't seem to get the returning of x if neither of the previous to statements are false.