I have a list in which I would like to add the filter. The filter in question should include specific words beyond the position in the string. However, I would also like to exclude certain words in the filter. This is the code I am using:
L_Glue = list(filter(lambda x: 'Glue' or 'Adhesive' in x, mat_paths["PLASTER"]))
For example, I would like all strings that have the word "Plaster" in them to be excluded from the list. I would also like the search to be independent of the letter type (upper or lower case).