This is the code. I want to remove all the stopwords from the sentence. I still get the word 'i'.
from nltk.corpus import stopwords
stopwords = stopwords.words('english')
en_stops=set(stopwords)
x='I am a good boy. I always pay by debts'
[item.lower().rstrip() for item in x.split() if item not in en_stops]
Output I get:
['i', 'good', 'boy.', 'i', 'always', 'pay', 'debts']