I have two python lists:
a = [(\'when\', 3), (\'why\', 4), (\'throw\', 9), (\'send\', 15), (\'you\', 1)] b = [\'the\', \'when\', \'send\', \'we\', \'us\'] <
A list comprehension will work.
a = [('when', 3), ('why', 4), ('throw', 9), ('send', 15), ('you', 1)] b = ['the', 'when', 'send', 'we', 'us'] filtered = [i for i in a if not i[0] in b] >>>print(filtered) [('why', 4), ('throw', 9), ('you', 1)]