title: How to read a text file word by word and compare these words with existing English dictionary in Python?
body: <p>I would like to read each word from a given text file and then want to compare these word with an existing English dictionary which may be a system dictionary or any other way.  Here is the code I have tried, but in the following code, there is a problem. The following codes reading brackets or any other unnecessary characters.</p>
  
  <pre><code>f=open('words.txt')
  M=[word for line in f for word in line.split()]
  S=list(set(M))
  
  for i in S:
      print i
  </code></pre>
  
  <p>How can I do the job?</p>