title: Cannot call a function twice, Python
body: <p>I have tried writting a function that takes a string of characters and returns the number of words in Enlgish that do not contain any of the characters in the string.</p>
  
  <pre><code>op= open('words.txt')
  
  def avoids(forbidden):
      """counts the number of words in Enlgish which do not contain any
      character found in forbidden str"""
      number=0
      for line in op:
          count=0
          for letter in line.strip():
              if forbidden.count(letter)==0:
                  count=count+1
          if count==len(line.strip()):
              number=number+1
      return number
  
  print(avoids('e'))
  
  print(avoids('a'))
  </code></pre>
  
  <p>When running the program, <code>print(avoids('e'))</code> works fine, printing 37641; however, <code>print(avoids('a'))</code> prints 0. Regardless of the strings I put as arguments in the function calls, the first funtion always returns the correct value, while the second one always returns 0. </p>
  
  <p>I am new to coding so I don't know why this happens and how to solve it. Help please.</p>