Словарь Python to CSV
import csv
csv_columns = ['word','matchin']
csv_file = "found.csv"
try:
with open(csv_file, 'w') as csvfile:
writer = csv.DictWriter(csvfile, fieldnames=csv_columns)
writer.writeheader()
for data in corpus:
writer.writerow(data)
except IOError:
print("I/O error")
py_hacker