title: Calculating distance from x and y coordinates from a text file
body: <p>I'm learning Python 3 and I have a question.  </p>
  
  <p>I have a text file 'test.txt' and it's contents are:</p>
  
  <pre><code>1, 2
  
  3, 4
  
  5, 7
  
  @@@@@@@ 
  
  10, 11
  
  19, 20 
  </code></pre>
  
  <p>The number on the left side is an <code>x</code> coordinate and the one on the right side is a <code>y</code> coordinate. 
  I want to get the distance from six digits, and the distance from four digit numbers below '@@@@@@@'.
  Since the distance formula is, 
  <em>Distance = SQRT((y2-y1)^2 + (x2-x1)^2)</em>.</p>
  
  <p>My problem is that I want to extract six numbers, and calculate the total distance from three pairs. For example, 
  <em>total_distance = SQRT((4-2)^2 + (3-1)^2) + SQRT((7-4)^2 + (5-3)^2)</em>.</p>
  
  <p>After that, I want to get (10, 11) and (19, 20). What makes me confused is that how can I skip '@@@@@@@' and extracting numbers as x and y coordinates.  </p>
  
  <p>I began to write code like this:</p>
  
  <pre><code>with open("text.txt") as filestream:
      for line in filestream:
          currentline = line.split(",")
  </code></pre>
  
  <p>I'm trying to figure out how to solve this issue. Can you help me out or give some advise on what should I do? </p>