I have two lists, shortened for this example:
l1 = ['Chase Bank', 'Bank of America']
l2 = ['Chase Mobile: Bank & Invest', 'Elevations Credit Union Mobile']
I am trying to generate a list from l1 that is not in l2. In this case; 'Bank of America' would be the only item returned.
Chase Bank (from l1) and Chase Mobile: Bank & Invest (from l2) are the same because they both contain the keyword 'Chase', so they wouldn't go into the exclusion list. But Bank of America should go into the list, even though 'Bank' appears both in 'Bank of America' and 'Bank & Invest'.
I have tried using set, just a for loop with if/in as well as using any with a list comprehension. I have also tried regex, but matching the pattern of substrings from one list to the other is proving to be very difficult for me.
Is this possible with Python or should I broaden my approach?