title: Given a list of tuple coordinates, find the nearest coord to a specified coord
body: <p>What is the most efficient way to do this? My current implementation is very messy:</p>
  
  <pre><code>def distanceTo(self, start, end):
      """Distance from cell A to cell B."""
      startx, starty = start
      endx, endy =  end
      return math.sqrt(math.pow(math.fabs(endx - startx), 2)
                       + math.pow(math.fabs(endy - starty), 2))
  
  
  def findNearestBuildings(self, myCoords, buildingGroup):
      """Returns a list of buildings specified, in ascending order of distance"""
      if len(buildingGroup.sprites()) == 0:
          return None
      buildings = []
      distances = []
      for building in buildingGroup.sprites():
          distance = self.distanceTo(myCoords, building.coords)
          for i in range(len(buildings)):
              if distances[i] &lt; distance:
                  if i == len(buildings):
                      buildings.append(building)
                      distances.append(distance)
              elif distances[i] &gt;= distance:
                  buildings.insert(i, building)
                  distances.insert(i, distance)
          if len(buildings) == 0:
              buildings.append(building)
              distances.append(distance)
      return buildings
  </code></pre>
  
  <p>What would be a more efficient way to do this? I am using PyGame but this should be a fairly universally applicable question. All coordinates are integer values.</p>