title: how to sum numbers from two different text files in python
body: <p>So, i have this problem:</p>
  
  <p>i have three txt-files: number1.txt, number2.txt and number3.txt.</p>
  
  <p>number1.txt have this number: 10 and number2.txt have this number too.</p>
  
  <p>So, what i want to do, is to sum up these numbers and add result to number3.txt.</p>
  
  <p>I have already this code:</p>
  
  <pre><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))
  </code></pre>
  
  <p>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. </p>
  
  <p>I have python 3.4.3.</p>