write
import csv
keys = ['a b','b','c','d']
with open('data.csv', 'w', newline='') as file:
writer = csv.writer(file)
for i in range(len(keys)):
writer.writerow([keys[i]])
read
path = "123.csv"
with open(path, "r", encoding="utf-8") as fread:
reader = csv.reader(fread)
for line in reader:
print(line)