I would like to rewrite value in csv file only in third frame for every line. First two frames would be same.
But in output of this code is
builtins.TypeError: '_csv.writer' object is not iterable
import csv
with open('friends.csv', mode='w') as file:
writer = csv.writer(file, delimiter=';', quotechar='"', quoting=csv.QUOTE_MINIMAL)
new_age = "25"
for line in writer:
writer.writerow(['line[0]','line[1]',new_age]) #it means that first two frmaes will be rewrited for same value like they are, last one will be rewrited to new_age.
Do you know how makes it better?
Thank you