title: Add a new column in text file
body: <p>I have already searched in the site but did not find anything specific for my case.
  I have a code that creates an array from a text file, and I just want to create a new file like the input one, but with the new array added in a column on the right. How can I do?</p>
  
  <p>Example of input file:</p>
  
  <pre><code>4.00171 2.04336E14 14.31034 0.65049
  2.56491 6.89220E13 13.83835 1.05022
  1.95019 3.45559E13 13.53852 1.38901
  </code></pre>
  
  <p>A part of code that creates an array:</p>
  
  <pre><code>import numpy as np
  
  dataset = np.genfromtxt(fname='input.dat') 
  s=dataset[:,3]
  d=1.686/s
  </code></pre>
  
  <p>And I just want to add the array d to a column on the right of the input file and save all in a new output file. (I'm using python 2.7).</p>