title: Join multiple files with python
body: <p>Is there a better way to join files?</p>
  
  <p>I have two files that I want to merge:</p>
  
  <p>File 1:
  AccountNo, firstName, lastName
  12, Peter, Smith
  14, Mary, Smith</p>
  
  <p>File 2: 
  AccountNo, Payment, Invoice
  12, 15.00, 1000
  14, 15.10, 1001</p>
  
  <p>I would like to join the files into one:
  AccountNo, firstName, lastName, Payment, Invoice
  12, Peter, Smith, 15.00, 1000
  14, Mary, Smith, 15.10, 1001</p>
  
  <p>I'm using Python 3.3</p>
  
  <pre><code>with open('names.txt', 'r') as names:
      with open('accounts.txt', 'r') as accts:
          with open('combined.txt', 'w') as outfile:
              n = n.readline()
              a = a.readline()
              outFile.write(n.replace('\n', '\t') + a)
  </code></pre>
  
  <p>Not sure this is the best way to do this, or if there is a better way to go about it.</p>
  
  <p>Thanks!</p>