title: Finding the longest words in a text file
body: <p>I have created a function to find the longest word in a text file and finding the longest word(s) in a text file that can be made from 9 letters. I'm new to python and I'm creating a game similar to countdown.</p>
  
  <p>I've created a function to find the longest word in the text file. What I want now is to create python code to find the longest word(s) that can be formed from the 9 letters.</p>
  
  <p>Each letter can only be used once. So from 'qugteroda', I should get rag outed, outraged, out dare, out read, outrage,readout. I'm using python 2.2</p>
  
  <pre><code>    def Words():
             qfile=open('dict.txt','r')
             longg=''
             for line in qfile:
             if len(line)&gt;len(longg):
               longg=line
             return longg
  </code></pre>