I have a Python script that compares two files, checks whether or not there have been any changes made and stores any changes to a list. I am trying to implement another list of words, characters, and other things for the script to ignore as changes. This list will be stored in a file called ignore.txt.
My first thought was when a something from the ignore list is seen in the list of changes, to remove it from the list and continue. Below is my solution, but it is not going to work since the length in the for loop changes and it won't look at each change. I've ran into a road block and need some assistance.
for i in changes:
for j in ignore:
if j in i:
changes.remove(i)
break
else:
print("Do something else")