-3
I’m trying to save data to a csv file from fields:
def inserir():
camp1 = str(ed1.get())
camp2 = str(ed2.get())
camp3 = str(ed3.get())
with open("contatos.csv","w") as _file:
_file.write("Nome;tel;endereço")
_file.write(camp1)
_file.write(camp2)
_file.write(camp3)
return None
And what is the doubt? Edit the question and be clearer.
– user28595
In the case the first line is leaving right, but the data that in the case the user typed by what in the case are stored in the variables camp, at most I can put one below the other in the column name.
– washington luis
Follow my suggestion and add this information in the question, click there on EDIT, so it is easier to understand the question without having to read here in the comments.
– user28595
Have you tried using . writelines() ?
– FourZeroFive