title: Finding suffixes in a set of strings, Python
body: <p>Given an input - words as a set of strings - determine whether any of the words contained in the set are suffixes of other words in the set, returning True if so, and False if not.</p>
  
  <p>Methods i have tried:</p>
  
  <pre><code>import re
  def findsuffix(words_set):
      for i in words_set:
          x = re.compile('w*'+i)
          for j in words_set:
              while i != j:
                  if x.search(j):
                      return True
                  else
                      return False
  </code></pre>
  
  <p>I have also tried .endswith() option.</p>
  
  <p>I am relatively new and still learning, i think it is iterating through the words set that i am having issues with. Any help would be appreciated. Thanks</p>