My first problem:
writer.writerow(['Name,' 'Street,,' 'Address,,,'])
The above example returns "Name,Street,,Address,,,"
I need it to return Name,Street,,Address,,, without the quotation marks.
What should I do?
My first problem:
writer.writerow(['Name,' 'Street,,' 'Address,,,'])
The above example returns "Name,Street,,Address,,,"
I need it to return Name,Street,,Address,,, without the quotation marks.
What should I do?
Stop putting commas in your values.
does not put quotes in the file....
If you are seeing a string in python they always have quotes in the repr ... you can use print to not show the quotes that wrap a python string ...
Ignacio's answer is absolutely right and is the one you want to use in practice.
But if you want to instruct csv to never use quotes, which is what the question seems to be literally asking, you can set the dialect paramater for quoting to csv.QUOTE_none. It would look like:
Also, if you really want to micromanage what goes intot he file, you can skip the csv library and just write strings to the file.