Python 3.3, finding anagrams?
<p>I'm trying to make a program in Python that finds anagrams. Here is my current code:</p>

<pre><code>def anagram(word,checkword):
    for letter in word:  
        if letter in checkword:  
            checkword = checkword.replace(letter, '') 
        else:  
            return False  
    return True  

while True:
    f = open('listofwords.txt', 'r')
    try:
        inputted_word = input('Word? ')
        for word in f:
            word = word.strip()
            if len(word)==len(inputted_word):
                if word == inputted_word:
                    continue
                elif anagram(word, inputted_word):
                    print(word)
                        #try:
                            #if word == 1:
                            #print ('The only anagram for', user_input, 'is', word)
                        #elif word &gt; 1:
                            #print ('The anagrams for', user_input, 'are', word)
                        #except TypeError:
                            #pass
    except:
        break 
</code></pre>

<p>I'm having trouble <em>outputting</em> the anagrams. The anagrams should be in one line, and the wording should reflect the amount of anagrams found. Such as...</p>

<blockquote>
  <p>"There is only one (insert anagram) for (insert word inputted)"</p>
  
  <p>"There are (insert anagrams) for (insert word inputted)" </p>
  
  <p>"There are no anagrams for (insert word inputted)"</p>
  
  <p>"The (insert word inputted) is not in the dictionary") </p>
</blockquote>
