title: why am i outputting the wrong string at the same time as the right
body: <p>i am taking a beginners programming class in python and we have just got to strings. our first assignment is to access a text file and return the lines that contain a specified letter. when i do this however, i get one line that is correct, and one that is completely wrong</p>
  
  <pre><code>text = open('some.txt')
  def countLine(text):
  q = 0 
  for c in text:
      return(c)
  
  def countLetterFile(char):
      for f in countLine(text):
          if f == char:
              print(countLine(text))
          else:
              pass
  countLetterFile('w')
  </code></pre>
  
  <p>it should print 'words make up other words'
  'words make sentences'
  and 'I have MS word'</p>
  
  <p>instead i get this</p>
  
  <pre><code>This is a line
  
  words make sentences
  </code></pre>