I have two lists. One contains sentences, the other contains words.
I want to have all the sentences, which do NOT contain any of the words from the list of words.
I'm trying to achieve this with list comprehensions. Example:
cleared_sentences = [sentence for sentence in sentences if banned_word for word in words not in sentence]
However, it doesn't seem to be working as I get an error telling me that a variable is used before assignment.
I've tried looking for nested comprehensions and I am sure this must have been asked for but I can not find anything.
How can I achieve this?