Python List Comprehensions - Comparing with DictI think it didn't work because of the problem noted by Manoj Awasthi -- you have spaces surrounding the keys in remArticles but your list of words in contentText probably does not contain any spaces.