title: AttributeError raised while exporting dict as csv file
body: <p>I'm sure I'm just too blind.
  With the help of some posts here (thanks to all) I was able to get further down the line step by step.</p>
  
  <p>I read an xls file, move it into a dict (I need to manipulate, i.e. delete some columns later) and write out as csv.</p>
  
  <p>my code:</p>
  
  <pre><code>wb = xlrd.open_workbook(args.inname)
  sheet = wb.sheet_by_index(0)
  
  # read header values into the list
  keys = [sheet.cell(0, col_index).value for col_index in xrange(sheet.ncols)]
  print "keys are", keys
  
  mydict = []
  for row_index in xrange(1, sheet.nrows):
      d = {keys[col_index]: sheet.cell(row_index, col_index).value
          for col_index in xrange(sheet.ncols)}
      mydict.append(d)
  
  with open('mycsvfile.csv','wb') as f:
      w = csv.writer(f, quoting=csv.QUOTE_ALL)
      w.writerow(mydict.keys())
      w.writerow(mydict.values())
  </code></pre>
  
  <p>but this gives me the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "xls2csv.py", line 80, in &lt;module&gt;
      main()
    File "xls2csv.py", line 53, in main
      w.writerow(mydict.keys())
  AttributeError: 'list' object has no attribute 'keys'
  </code></pre>
  
  <p>Interesting enough: the "Print "keys are", keys DOES print all the keys correctly ...</p>