Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
so to speak, but its own) solution in Clear category for Nearest Value by samatdav02
def nearest_value(values: set, one: int) -> int:
values = sorted(list(values))
tlist = [abs(x-one) for x in values]
return values[tlist.index(min(tlist))]
Dec. 30, 2020