title: ValueError: invalid literal for int() with base 10: '\n'
body: <p>I am looking for an answer to this error with my specific code. I have searched the others and they are still so confusing. </p>
  
  <p>I am unsure why this is happening.</p>
  
  <p>Here is the code section that the error is referencing, followed by the error.</p>
  
  <pre><code>def processScores( file, score):
  #opens file using with method, reads each line with a for loop. If content in line
  #agrees with parameters in  if statements, executes code in if statment. Otherwise, ignores line    
  
      with open(file,'r') as f:
          for line in f:  #starts for loop for all if statements
              if line[0].isdigit: 
                  start = int(line) 
                  score.initialScore(start) #checks if first line is a number if it is adds it to intial score
  </code></pre>
  
  <p>The error message I'm getting:</p>
  
  <pre><code>    Traceback (most recent call last):
    File "&lt;pyshell#20&gt;", line 1, in &lt;module&gt;
      processScores('theText.txt',score)
    File "C:/Users/christopher/Desktop/hw2.py", line 49, in processScores
      start = int(line)
  ValueError: invalid literal for int() with base 10: '\n'
  </code></pre>
  
  <p>Thanks everyone, I wouldn't be posting  this if i didnt find a clear answer in the other posts </p>