title: Python - Converting contents of a file to int from string
body: <p>I have a program that saves the scores you get in the program in a seperate file, however, the file saves the score as this:</p>
  
  <blockquote>
    <p>2 4 6 8 9 8</p>
  </blockquote>
  
  <p>My problem is that I cannot convert these to integers, so that I then can add them all together to a total sum.</p>
  
  <p>This is as far as I have come: </p>
  
  <p><code>scores = open("scores.txt", "r")</code></p>
  
  <p>After that everything I have tried just ends up in different errors.</p>
  
  <p>Anyone got any idea of what to do?</p>