"CSV" is not a standard, and even though "CSV" literally means "comma-separated values", using tab as the delimiter is just as common as a comma, if not more common. See also wikipedia: http://en.wikipedia.org/wiki/Comma-separated_values
To cater for CSV fields containing the delimiter (i.e. tab or comma), it's common to quote the data, i.e. with double quotes. There is no standard - sometimes only data fields that contains the delimiter is quoted. In the example below all fields will be quoted.
With the csv built-in library it's quite easy to modify the format of the output CSV file as you like.
import csv
objs = [{'name': 'knut', 'age': 74, 'count': 13},
{'name': 'lydia', 'age': 14, 'count': 3}]
with open("/tmp/example.csv", "w") as outfile:
## Ordering of the fields in the CSV output
headers = ['name', 'age', 'count']
## although "CSV" stands for "comma separated values",
## it's quite common to use other delimiters i.e. TAB
## and still call it "CSV".
writer = csv.writer(outfile, delimiter="\t", quotechar='"', quoting=csv.QUOTE_ALL)
## it's common in CSV to have the headers on the first line
writer.writerow(headers)
## Write out the data
for obj in objs:
writer.writerow([obj[key] for key in headers])
This example also demonstrates condensed list operations in python ... [obj[key] for key in headers]
means "give me the list of obj[key] for all keys in header".