Return x limited to the range [lo, hi].
Write clamp(x, lo, hi).
Starter:
def clamp(x, lo, hi):
# TODO
pass
Solve it interactively in your browser (no setup), check your answer instantly, and keep your daily streak going on IWTLP: https://iwtlp.com/challenge
Top comments (0)