Hello, I have a dictionary similar to this:<br>dyc = {<br>'a50' : ['textfield', 50, 40],<br>'k77' : ['othertext', 60, 10]<br>}<br><br>I was trying to write a csv with the csv module, by doing this:<br>
import csv<br>myfile = open('c:/myscripts/csv-test.csv', 'wb')<br>mywriter = csv.writer(myfile, dialect='excel')<br><br>for item in dyc:<br><div style="margin-left: 40px;">mywriter.write(item)<br><br>
</div>myfile.close()<br><br>this gives me this result:<br>a50,"['textfield', 50, 40]"<br>k77,"['othertext', 60, 10]"<br><br>I would like this, instead:<br>a50,"textfield", 50, 40<br>
k77,"othertext", 60, 10<br><br>I also could manage to transform that dictionary in a list like this:<br>[ [a50,"textfield", 50, 40], [k77,"othertext", 60, 10]<br><br>Thanks in advance for your advice<br>
<br><br>