I am trying to remove sublist from nested lists based on elements values.
data = [['1', 'i like you'],
['2', 'you are bad'],
['5', 'she is good'],
['7', 'he is poor']]
negative_words = set(['poor', 'bad'])
If the second column contains negative words, I would like to remove the sub-lists. So, the desired results are below. Any suggestions?
data = [['1', 'i like you'],
['5', 'she is good']]