title: How do I read and write CSV files with Python?
body: <p>How do I read the following CSV file?</p>
  <pre><code>1,&quot;A towel,&quot;,1.0
  42,&quot; it says, &quot;,2.0
  1337,is about the most ,-1
  0,massively useful thing ,123
  -2,an interstellar hitchhiker can have.,3
  </code></pre>
  <hr />
  <p>How do I write the following <code>data</code> to a CSV file?</p>
  <pre><code>data = [
      (1, &quot;A towel,&quot;, 1.0),
      (42, &quot; it says, &quot;, 2.0),
      (1337, &quot;is about the most &quot;, -1),
      (0, &quot;massively useful thing &quot;, 123),
      (-2, &quot;an interstellar hitchhiker can have.&quot;, 3),
  ]
  </code></pre>