python入門リストをCSVファイルに書き出すサンプル
サンプルコード
import csv cft = [[2001, "yamada", "東京",21], [2002, "sugimura", "横浜",31], [2003, "yoshita", "川崎",25], [2004, "sakura", "大阪",26]] with open("employeet.csv", "w") as emp: k = csv.writer(emp) for dd in cft: k.writerow(dd)