Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
make tuple and sort solution in Clear category for Nearest Value by tokyoamado
def nearest_value(values: set, one: int) -> int:
return sorted((abs(v - one), v) for v in values)[0][1]
April 14, 2019