I have two list :
list_1 = ['world', 'abc', 'bcd', 'ghy', 'car', 'hell', 'rock']
list_2 = ['the world is big', 'i want a car', 'puppies are best', 'you rock the world']
I would like to check if words of list_1 exists in list_2 in any shape or form and simple delete that whole sentence from list_2 and finally, print list_2
For example:
the word 'world' from list_1 should take out the sentence 'the world is big' from list_2
the word 'car' from list_2 should take out the sentence 'i want a car'
I have tried using list comprehension like this, but it sadly repeats
output = [j for i in list_1 for j in list_2 if i not in j]
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…