What is the most "pythonic" way to do this? x = some_value bounds = [lower_bound, upper_bound] if x < bounds[0]: x = bounds[0] if x > bounds[1]: x = bounds[1] Continue reading...