I have a list of strings that I want to remove items from. I have a list of keywords that I am searching for in these items. I cannot seem to get the output I am looking for. I am not sure if regular expressions are the right way to handle this.
I want the output to be ['/item/page/cat-dog', '/item/page/animal-planet']
valid = ['/item/page/cat-dog', '/item/page/animal-planet', '/item/page/variable'] keywords = ['cat','planet'] for item in valid: #a = re.findall() #