python find the second nearest value in a list code example
Example: python get nearest value in list
def takeClosest(num,collection):
return min(collection,key=lambda x:abs(x-num))
def takeClosest(num,collection):
return min(collection,key=lambda x:abs(x-num))