If, and only if you are writing a very simple CSV such as this, then you don't really need the csv
package. Just open the file and write away:
f = open("out.csv", "w")
...
for line in lines:
//line = ["col1","col2","","col3",""]
csv_line = str.join(",",line)
f.writeline(csv_line)
f.close()
If your data is more complex (i.e. not purely numeric) you will run into problems however.