4
Well, basically, I need to skip a line, after certain writing.
insira o código aqui
print("+---------------------+")
print("|DEMONSTRAÇÃO DA LINHA|")
print("+---------------------+")
print()
arqTeste = open("ArquivoTeste.txt", "w")
arqTeste.write("Python")
#Tentativa de Pular linha
arqTeste.write("")
arqTeste.write("Python 3")
arqTeste.close()
Well, another question, how can I use two objects in writing a file? For example:
insira o código aqui
nome = "Ana"
idade = "20"
arqTest2 = open("arqTest2.txt", "w")
#É essa a minha outra dúvida, não sei como fazer isso!
arqTest2.write("Nome =", nome)
arqTest2.write("Idade =", idade)
arqTest2.close()
Thank you, it worked friend, but, there are no other ways to do these two things(as a matter of curiosity, rsrs)?
– Kappa
As for the first one I’m pretty sure no, as for the second one there are more ex:
arqTest2.write("Idade = " +str(idade))
, but I advise to useformat
. @Kappa, if I helped mark sff the answer as accepted, below the arrows above/below the left of the answer– Miguel
Thank you, you took away all my doubts!!
– Kappa
@No Kappa, I’m glad you solved
– Miguel