Hi I have a csv file with names and surnames and empty username and password columns.
How can I use python csv to write to the columns 3 and 4 in each row, just appending to it, not overwriting anything.
Hi I have a csv file with names and surnames and empty username and
Share
The
csvmodule doesn’t do that, you’d have to write it out to a separate file then overwrite the old file with the new one, or read the whole file into memory and then write over it.I’d recommend the first option: