[Solved] Splitting to words in a list of strings

A very minimal example: stops = {‘remove’, ‘these’, ‘words’} strings = [‘please do not remove these words’, ‘removal is not cool’, ‘please please these are the bees\’ knees’, ‘there are no stopwords here’] strings_cleaned = [‘ ‘.join(word for word in s.split() if word not in stops) for s in strings] Or you could do: strings_cleaned … Read more