-2
Could you help me? wanted to return the result of this function in a file for after that generate it send it to another application. I have tried several ways, but even opens the file, but when I look inside it is blank.
def inventario():
print('\n*** Ajuste de Inventário ***\n')
codprod = input('Código do Produto?: ')
qt = input('Quantidade Contada: ')
motivo = input('Motivo do Ajuste: ')
user = input('Solicitante: ')
return (codprod, qt, motivo, user)
resultado = open('resultado.txt', 'r+')
arq = (codprod, qt, motivo, user)
for x in arq:
resultado.write(x)
resultado.write("\n")
resultado.close()
Thank you so much! I am new to the language and I am learning, but it helped me a lot!
– kurtz_lima
Tranquil @kurtz_lima, how nice that I helped. Please, since you are new here, I ask you to check How and why to accept an answer.
– Clarck Maciel