title: Writing a csv from a python list of tuples
body: <p>I have a List like this </p>
  
  <pre><code>lis = [('a', [('happy:units:1', 'cloud:1'), ('sad:units:1', 'rain:2'), 'rating:3']),]
  </code></pre>
  
  <p>I want a csv like this
  <a href="https://i.stack.imgur.com/kmGb1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kmGb1.png" alt="enter image description here"></a></p>
  
  <pre><code> import csv
  
   with open('Yo456!.csv', 'wb') as out:
       csv_out = csv.writer(out, delimiter=',')
       csv_out.writerow(['id', 'happy:units', 'cloud', 'sad:units', 'rain', 'rating'])
       for row in lis:
           csv_out.writerow(row)
  </code></pre>
  
  <p>But Im getting the OutPut</p>
  
  <p><a href="https://i.stack.imgur.com/GD7IH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GD7IH.png" alt="enter image description here"></a></p>