title: How to turn a dictionary into list in Python
body: <p>I'm using Flask to grab the input from an HTML form, which returns it as a dictionary object, for example:</p>
  
  <pre><code>form = {'Name': 'Eddie', 'Comment': 'Nice location', 'Days Stayed': '7'}
  </code></pre>
  
  <p>Now, I can use <code>dict.items()</code> to get the dictionary into a format which I can display in an HTML table (list of tuples):</p>
  
  <pre><code>formList = [('Name', Eddie), ('Comment', 'Nice Location'), ('Days Stayed', '7')]
  </code></pre>
  
  <p>This stores nicely into a .csv in the following way:</p>
  
  <pre><code>Name,['Eddie']
  Comment,['Nice Location']
  Days Stayed,['7']
  </code></pre>
  
  <p>However, I'd like my .csv (and therefore HTML Table) to store like this:</p>
  
  <pre><code>Eddie, Nice Location, 7
  Dave, Good Food, 14
  Steve, Room was cosy, 10
  </code></pre>
  
  <p>So I can have my field names at the top and create a nice looking table. How can I achieve this?</p>