[Solved] Filter words from list python
This is because your listeexclure is just a string. If you want to search a string in another string, you can do following: Let’s assume you have a list like: lst = [‘a’, ‘ab’, ‘abc’, ‘bac’] filter(lambda k: ‘ab’ in k, lst) # Result will be [‘ab’, ‘abc’] So you can apply same method in … Read more