title: palindrome program, from text file python
body: <p>I have to make a program that tests if an input string is a palindrome. A palindrome is a sequence of words that reads the same as the sequence in reverse, such as the word 'noon'. 
  The program requirements are as follows:</p>
  
  <ul>
  <li>You must use a stack</li>
  <li>The program should ignore all characters other than letters.</li>
  <li>Input from file</li>
  <li>Test single words and complete sentences</li>
  <li>There should be some true false results.</li>
  </ul>
  
  <p>Here is my code so far:</p>
  
  <pre><code>f = open('myTextFile.txt', "r")    
  line = f.readline()
  
  while line:    
        print(line)    
        line = f.readline()    
        exclude = set("-")    
        line = ''.join(ch for ch in line if ch not in exclude)    
        exclude = set(",")    
        line = ''.join(ch for ch in line if ch not in exclude)    
        exclude = set(".")    
        line = ''.join(ch for ch in line if ch not in exclude)    
        exclude = set(" ")    
        line = ''.join(ch for ch in line if ch not in exclude)
  
  f.close()
  </code></pre>
  
  <p>My question is what to do next, I'm kind of lost, I removed all the extra characters, should I put each line into a list to work with them separately? Can you just guide me in the right direction?</p>