Answers for "how to get index of closest value in list python"

0

how to get index of closest value in list python

min(range(len(a)), key=lambda i: abs(a[i]-11.5))
Posted by: Guest on July-12-2020

Code answers related to "how to get index of closest value in list python"

Python Answers by Framework

Browse Popular Code Answers by Language