title: Write url request output to a csv in Python
body: <p>I want to write the response out into a csv. Here's my code:</p>
  
  <pre><code>import requests
  from bs4 import BeautifulSoup
  import csv
  import time
  
  site = 'url'
  
  with open('receipts_10.csv', 'rU') as csvfile:
      reader = csv.reader(csvfile, delimiter=';')
      for row in reader:
  
          response = requests.post(site, params={'appReceiptNum':row})
          soup = BeautifulSoup(response.text)
          status = soup.find("h4")
          statusString = status.text
  </code></pre>
  
  <p>I've opened up a csv and now I want to overwrite that same csv with the output:</p>
  
  <pre><code>        print(statusString)
  </code></pre>
  
  <p>As you can see I'm only printing out the response in the console, but need it in  a .csv instead. Any ideas? </p>