title: add row to a csv file with python
body: <p>I have to csv files that each has 2 columns, one of them being the date. I want to add the second column of the second file to the first file, resulting a file with 3 columns.</p>
  
  <p>I did it by creating a new file and appending the data to it this way:</p>
  
  <pre><code>import csv
  
  coinsfile = open('total-bitcoins.csv', newline='')
  pricesfile = open('market-price.csv', newline='')
  
  coins = csv.reader(coinsfile, delimiter=',')
  prices = csv.reader(pricesfile, delimiter=',')
  
  with open('result.csv', 'w') as res:
      for coin_row, price_row in zip(coins, prices):
          line = str(coin_row[0]) + ',' + str(coin_row[1]) + ',' + str(price_row[1])
          res.append(line)
  </code></pre>
  
  <p>The code runs without any errors but the result is a csv file which is completely empty.</p>
  
  <p>Where am I making the mistake, or is there a better way to do this job?</p>