-4
My first question here, guys,
I need to add a line break before he writes for1 again, as I do in this code?
And I would also like for7 to be the last to be printed, as in the original file it comes by second it is printed under for1, and not last.
in_file = "nomes2.txt"
out_file = "remetentes.txt"
for1 = "nome"
for2 = "endereco"
for3 = "numero"
for4 = "bairro"
for5 = "cidade"
for6 = "cep"
for7 = "cpf"
with open(out_file, "w") as out_f:
with open(in_file, "r") as in_f:
for line in in_f:
if for1 in line or for2 in line or for3 in line or for4 in line or for5 in line or for6 in line or for7 in line:
print(line)
out_f.write(line.replace('"', '').replace('nome:', '').replace(',',''))
```
Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of it. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English (short version). Do our [tour]
– Augusto Vasques