For a writerow
of a csv.DictWriter
, I need to fill a (part of a) dictionary to be empty. I found no immediate solution for it. Is there one?
Like with
fieldnames = ['first','last']
Pseudocode
row = fieldnames.fill(None)
Result
print(row)
['first':None,'last':None]
So that
destination.writerow(row)
results in
,