title: Nested for loop on tupled coordinates
body: <p>I need to write a code that will eventually read in coordinates from across multiple tables of big data stored in excel sheets but first I wanted to learn to write a nested for loop to analyze the tuples in the code below.</p>
  
  <p>All I can find for nested for loops don't have anything like this so I thought it could be good to post up here. </p>
  
  <p>What I need this code to do specifically is to take the first coordinate in file1 and compare it to each coordinate in file2, Then second coordinate in file1 to each coordinate in file2, and so on to loop through each coordinate in file1 compared to every coordinate in file to and then return if the two share the specified proximity. </p>
  
  <pre><code>import math
  file1 = ('1.36, 7.11', '1.38, 7.12', '1.5, -7.14', '8.7, 3.33', '8.5, 3.34', '8.63, -3.36')
  file2 = ('1.46, 7.31', '1.47, 7.32', '1.49, -7.34', '8.56, 3.13', '8.57, 3.14', '8.59, -3.16')
  dist = file1.apply(lambda row: math.hypot(row['x_diff'], row['y_diff']), axis=1)
  for dist in file1:
      for dist in file2:
          if dist.values &gt;= .5:
              print 'no match'
          elif dist.values &lt;= .5:
              print True, dist
  </code></pre>
  
  <p>My hunch with whats wrong is that I am not filling the appropriate command to read the tuples as coordinates. Then furthermore, I am having a lot of confusion as to what I ought to write in this statement here <code>for dist in file1</code>. By that I mean what I am supposed to call and how to label it appropriately. </p>
  
  <p>I realize this is probably a mess but, this is my first coding project ever so if absolutely anybody can help steer me in the right direction or provide some feedback as to what I might need to understand better here I would greatly appreciate it. </p>