What i am trying to do here is have a tuple of numbers, lets say X. Then i have a list of a few other tuples. I want the program to find the tuple that is closest in value.
x = (214,521) lis = [(200,500),(250,550),(300,600)]
I am doing this becuase i want to find where a person clicks on screen and then work out which function to run by finding which one in the list the person clicked closest to. Im having trouble getting started here so any help would be greatly appreciated.