'STOPWORDS' is not defined after importing stopwords

As pointed out earlier, the first time you need to include the following in your code, in order to download the list to your computer:

nltk.download('stopwords')

Then, you can load, for example, the English stop words list as follows:

stop_words = list(stopwords.words('english'))

and even extend it, if you need to:

stop_words.extend(["best", "item", "fast"])

Use it to remove stop words from text:

from nltk.tokenize import word_tokenize
word_tokens = word_tokenize(text)
clean_word_data = [w for w in word_tokens if w.lower() not in stop_words]