Storing list in to csv file using python
<p>I'm trying to store a type list variable in to a csv file using python. Here is what I got after hours on StackOverflow and python documentation:</p>

<p>Code:</p>

<pre><code>row = {'SgDescription': 'some group', 'SgName': 'sku', 'SgGroupId': u'sg-abcdefgh'}
new_csv_file = open("new_file.csv",'wb')
ruleswriter = csv.writer(new_csv_file,dialect='excel',delimiter=',')
ruleswriter.writerows(row)
new_csv_file.close()
</code></pre>

<p>Result:</p>

<pre><code>$ more new_file.csv 
S,g,D,e,s,c,r,i,p,t,i,o,n
S,g,N,a,m,e
S,g,G,r,o,u,p,I,d
</code></pre>

<p>Can anyone please advice how to store the values to the file like this:</p>

<pre><code>some group,sku,sg-abcdefgh
</code></pre>

<p>Thanks a ton!</p>