So, i have this problem:
i have three txt-files: number1.txt, number2.txt and number3.txt.
number1.txt have this number: 10 and number2.txt have this number too.
So, what i want to do, is to sum up these numbers and add result to number3.txt.
I have already this code:
number1 = open("files/number1.txt", encoding="utf-8").read()
number2 = open("files/number2.txt", encoding="utf-8").read()
number3 = open("files/number3.txt", "w", encoding="utf-8")
result = float(number1) + float(number2)
number3.write(str(result))
But nothing shows up on the number3.txt. I have no idea why this is not working. I know this is maybe an pretty stupid question, but i hope you guys can help me.
I have python 3.4.3.
print(result)?