I have two lists and I want to process only the elements part of which do not match.
ListA = ['CAT.txt','CAT.txt.ext','DOG.txt','DOG.txt.ext','TIGER.txt.ext',TIGER.txt'] ListB = ['CAT_NEW.txt','CAT_NEW.txt.ext', 'TIGER_NEW.txt', 'TIGER_NEW.txt.ext']
List B is a subset of list A with "_NEW"
Output I want: ListC = ['DOG.txt', 'DOG.txt.ext']
This is a work around for another question I had asked : Python: Trying to check if file exists and if not create new files and final output list . Checked multiple threads but the .txt.ext is hard to split on...
Figured if I split the input lists, I can implement without checking for the log file.
I checked this : Python: how to find the element in a list which match part of the name of the element