Cody Bable

Generation

generate functionTue, 23 May 2023

def nearest_value(values: set[int], one: int) -> int:

def nearest_value(values: set[int], one: int) -> int: l = list(values) l.sort() for i in l: if i > one: return i return l[-1]

Questions about programming?Chat with your personal AI assistant