title: How do I put single-quotes around string using Python csv writer?
body: <pre><code>with open("emails.csv", "w") as csvfile:
      for control_rent_email in control_group_renters:
          email_writer = csv.writer(csvfile, quotechar='"', quoting=csv.QUOTE_NONNUMERIC,delimiter=',')
          email_writer.writerow([control_rent_email])
      csvfile.close()
  </code></pre>
  
  <p>I get the following output in the "emails.csv":</p>
  
  <pre><code>"susan@gmail.com"
  "joe@gmail.com"
  "sara@yahoo.com"
  </code></pre>
  
  <p>But I want the output to be </p>
  
  <pre><code>'susan@gmail.com',
  'joe@gmail.com',
  'sara@yahoo.com'
  </code></pre>
  
  <p>How do I put the correct parameters in csv.writer() to achieve this desired result? </p>
  
  <p>UPDATE: </p>
  
  <p>1) </p>
  
  <pre><code>email_writer = csv.writer(csvfile, quotechar=''', quoting=csv.QUOTE_NONNUMERIC,delimiter=',')                                                                                            
  SyntaxError: EOL while scanning string literal
  </code></pre>
  
  <p>2) How do I place the "," to look like the output result? </p>