Python provides csv.DictWriter for outputting CSV to a file.
What is the simplest way to output CSV to a string or to stdout?
For example, given a 2D array like this:
[["a b c", "1,2,3"],
["i \"comma-heart\" you", "i \",heart\" u, too"]]
return the following string:
"a b c, \"1, 2, 3\"\n\"i \"\"comma-heart\"\" you\", \"i \"\",heart\"\" u,
…