Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Nearest_value... solution in Clear category for Nearest Value by maksimus
def nearest_value(values: set, one: int):
l = sorted(list(values))
return min([(x, (one-x)**2) for x in l], key=lambda t: t[1])[0]
May 20, 2020