title: print results to text file in tabular form
body: <p>I am currently printing onto console, can I print the output onto a text file in tabular form? </p>
  
  <p>I am trying to write the file with:</p>
  
  <pre><code>with open("increment.txt", "w") as file:
      file.write(i, mol)
      file.close()
  </code></pre>
  
  <p>Here is the program:</p>
  
  <pre><code>import numpy as np
  
      i: int
      for i in range(1, 100,5):
          mol = int((i*5)/(i+2))
  
          print('i &amp; mol are:',i, mol)
  
  
      with open("incre.txt", "w") as file:
          file.write(i, mol)
          file.close()
  </code></pre>
  
  <p>Error message..
  file.write(i, mol)</p>
  
  <p>TypeError: write() argument must be str, not tuple</p>