title: Python: appending a row in a csv file cause it to be split randomly
body: <p>I'm writing a python (3.7) function that takes a string and append it to a .csv file. Here's the code:</p>
  
  <pre><code>def write_to_file(row):
      print("row: ",[row])
      with open('output.csv', mode='a') as output_file:
          output_file_writer = csv.writer(output_file)
          output_file_writer.writerow([row])
  </code></pre>
  
  <p>When I print the row I have results like:</p>
  
  <pre><code>row:  ["Introducing company, the tool that let's you manage your coins alt-coin on coinbase-pro, and many other exchanges automatically."]
  </code></pre>
  
  <p>but the .csv that it writes looks like this:
  <a href="https://i.stack.imgur.com/wcS1p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wcS1p.png" alt="enter image description here"></a></p>
  
  <p>The funny thing is that if I copy the output of the print and I hard-code it in the <code>write</code> command, like this:</p>
  
  <pre><code>                output_file_writer.writerow(["Introducing company, the tool that let's you manage your coins alt-coin on coinbase-pro, and many other exchanges automatically."])
  </code></pre>
  
  <p>The .csv file is correct. What am I missing?</p>