#Example of code that may not work the way you expect it to. badWords = ['the', 'a', 'if'] ourWords = [ 'cat', 'dog', 'the', 'a','if', 'food'] for word in ourWords: if word in badWords: index = ourWords.index(word) del ourWords[index] print( ourWords )