title: Python append words to a list from file
body: <p>I'm writing a program to read text from a file into a list, split it into a list of words using the split function. And for each word, I need to check it if its already in the list, if not I need to add it to the list using the append function.</p>
  
  <p>The desired output is:</p>
  
  <pre><code>['Arise', 'But', 'It', 'Juliet', 'Who', 'already', 'and', 'breaks', 'east', 'envious', 'fair', 'grief', 'is', 'kill', 'light', 'moon', 'pale', 'sick', 'soft', 'sun', 'the', 'through', 'what', 'window', 'with', 'yonder']
  </code></pre>
  
  <p>My output is :</p>
  
  <pre><code>[['But', 'soft', 'what', 'light', 'through', 'yonder', 'window', 'breaks', 'It', 'is', 'the', 'east', 'and', 'Juliet', 'is', 'the', 'sun', 'Arise', 'fair', 'sun', 'and', 'kill', 'the', 'envious', 'moon', 'Who', 'is', 'already', 'sick', 'and', 'pale', 'with', 'grief']]
  </code></pre>
  
  <p>I have been trying to sort it and remove the double square brackets "[[ &amp; ]]" in the begining and end but I'm not able to do so. And fo some reason the sort() function does not seem to work.</p>
  
  <p>Please let me know where I am making a mistake.</p>
  
  <pre><code>word_list = []
  word_list = [open('romeo.txt').read().split()]
  for item in word_list:
      if item in word_list:
          continue
      else:
          word_list.append(item)
  word_list.sort()
  print word_list
  </code></pre>