I have a list of words in l that if any of it exists in the first index of each tuple in l2, remove the entire tuple.
my code:
l = ['hi', 'thanks', 'thank', 'bye', 'ok', 'yes', 'okay']
l2 = [('hi how are u', 'doing great'), ('looking for me', 'please hold')]
l3 = [k for k in l2 if not any(i in k[0] for i in l) ]
somehow the code does not work and i get back an empty list for l3.
I want
l3 = [('looking for me', 'please hold')]