fullWords = re.findall('\\w+', allText)
d = defaultdict(int)
for word in fullWords:
    if word not in stopWords:
        d[word] += 1
finalFreq = sorted(iter(d.items()), key=lambda t: t[1], reverse=True)
self.response.out.write(finalFreq)
Word Frequency in text using Python but disregard stop words