Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
one line but slow solution in Clear category for Nearest Value by Mesure
def nearest_value(values: list, one: int) -> int:
return min(sorted(values), key = lambda x: abs(x - one))
June 11, 2021
Comments: