I am having the list like below
I am trying to delete the element which contains the word ‘exclude’ by using the below code.
for i in list1:
if ‘exclude’ in i:
When i run the programme it is removing the first exclude not the second one. Please let me know how to remove all exclude and what mistake i am doing.