title: How to store data from a list in a .csv file?
body: <p>A list b is like:</p>
  <pre><code>X = [((a,b),12),((c,d),34),...]
  for i in range(0,5):
      print X[i][0][0],X[i][1],X[i][0][1]
  </code></pre>
  <p>I want to save my data in a <code>csv</code> file. Eg. This can be saved as :</p>
  <ul>
  <li><code>a,12,b</code>- in first row (which is <code>X[0][0][0], X[0][1]</code>)</li>
  <li><code>c,34,d</code> - in my second row and so on.</li>
  </ul>
  <p>This is part of my project and I have no idea about <code>.csv</code> file.</p>
  <h1>What I did</h1>
  <pre><code>writer= csv.writer(open('dict.csv','wb'))
  for i in range(0,5):
      writer.writerow([x[i][0][0],x[i][1],x[i][0][1]])
  </code></pre>
  <p>But couldn't find anything in the csv file. How to fix it?</p>