title: How should I strip these tweets of words like "the" and "I"?
body: <p>I'm trying to clean up a bunch of tweets so that they can be used for k-means clustering. I've written the following code that should strip each tweet of its unwanted characters.</p>
  
  <pre><code>from nltk.corpus import stopwords
  import nltk
  import json
  
  with open("/Users/titus/Desktop/trumptweets.json",'r', encoding='utf8') as f:
      data = json.loads(f.readline())
  
  tweets = []
  for sentence in data:
      tokens = nltk.wordpunct_tokenize(sentence['text'])
  
      type(tokens)
  
      text = nltk.Text(tokens)
      type(text)
      words = [w.lower() for w in text if w.isalpha() and w not in 
                      stopwords.words('english') and w is not 'the']
      s = " "
      useful_sentence = s.join(words)
      tweets.append(useful_sentence)
  
  print(tweets)
  </code></pre>
  
  <p>I'm trying to remove words like "I" and "the", but for some reason I can't figure out how. If I look at the tweets after they've gone through the loop, the word "the" still occurs.</p>
  
  <p><strong>Question:</strong> How is it possible that there are still occurences of "the" and "I" in the tweets? How should I fix this?</p>