On Aug 24, 5:00 pm, Peter Otten <__pete...@web.de> wrote: > If I understand you correctly the csv.writer already does > what you want: > > >>> w.writerow([1,None,2]) > 1,,2 > > just sequential commas, but that is the special treatment. > Without it the None value would be converted to a string > and the line would look like this one: > > 1,None,2
No, I think he means he is getting >>> w.writerow([1,None,2]) 1,"",2 He evidently wants to quote "all" strings, but doesn't want None to be considered a string. John -- http://mail.python.org/mailman/listinfo/python-list