Remove list items from within list of list

How do I remove all 'd' and 'e'

abc = [('a','b','c','d','e'), ('a','b','c','d','e'), 
 ('a','b','c','d','e'), ('a','b','c','d','e')]

abc.remove('d')

ValueError: list.remove(x): x not in list

abc.remove('d', 'e')

TypeError: remove() takes exactly one argument (2 given)

finalList = []
for l in abc:
    finalList.append([i[3] for i in l])

IndexError: string index out of range

Answer

You can use a nested list comprehension to check if any of the sub elements are in your “blacklist” and keep the rest.

>>> [tuple(i for i in sub if i not in {'d', 'e'}) for sub in abc]
[('a', 'b', 'c'), ('a', 'b', 'c'), ('a', 'b', 'c'), ('a', 'b', 'c')]