title: stemming words in python
body: <p>I'm using this code to stem words, here is how it works, first there's a list of suffixes, the program checks if the word has the ending same as the one in the list if positive it removes the suffix, however, when I run the code I get this result:  </p>
  
  <pre><code>suffixes = ['ing']
  def stem(word):
  for suff in suffixes:
      return word[:-len(suff)]
  
  stem ('having')
  print (stem)
  </code></pre>