title: Python: For each list element apply a function across the list
body: <p>Given <code>[1,2,3,4,5]</code>, how can I do something like </p>
  
  <pre><code>1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3,3/4,3/5,.... 5/1,5/2,5/3,5/4,5/5
  </code></pre>
  
  <p>I would like to store all the results, find the minimum, and return the two numbers used to find the minimum. So in the case I've described above I would like to return <code>(1,5)</code>.</p>
  
  <p>So basically I would like to do something like</p>
  
  <p>for each element <code>i</code> in the list
  map some function across all elements in the list, taking <code>i</code> and <code>j</code> as parameters
  store the result in a master list, find the minimum value in the master list, and return the arguments <code>i</code>, <code>j</code>used to calculate this minimum value.</p>
  
  <p>In my real problem I have a list objects/coordinates, and the function I am using takes two coordinates and calculates the euclidean distance. I'm trying to find minimum euclidean distance between any two points but I don't need a fancy algorithm.</p>