Ok so I\'m defining a function that takes a variable number of inputs and clamps each of them
def clamp(*args): return [ max(min(arg, 0.8), 0.2) for arg in a
def clamp(*args): lst = [max(min(arg, 0.8), 0.2) for arg in args] if len(lst)==1: return lst[0] return lst