title: How to add a copy of each line in a txt (containing two parts separated by a particular symbol) with the order of the two parts inverted?
body: <p>I have txt with a number of lines (x@y). Each file has two parts (x, y) separated by a particular symbol (@). How would a python script that reads each line in a txt and adds a new line under each existing line, where the order of the two parts (x@y) is inverted (y@x).</p>
  
  <p>What I'm trying to do presented as input/output:</p>
  
  <p>INPUT:</p>
  
  <pre><code>x1@y1
  x2@y2
  x3@y3
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>x1@y1
  y1@x1
  x2@y2
  y2@x2
  x3@y3
  y3@x3
  </code></pre>
  
  <p>How can this be done with python?</p>