Given the nested lists:
[[y for y in x if y not in to_del] for x in my_list]
With list and lambda filter:
[filter(lambda y: y not in to_del, x) for x in my_list]
Trying the general case of randomly nested lists:
def f(e):
if not isinstance(e,list):
if e not in to_del:
return e
else:
return filter(None,[f(y) for y in e])
to_del = ['A','B']
my_list= [['A'], ['B',['A','Z', ['C','Z','A']]], ['C','D','A','B'],['E'], ['B','F','G'], ['H']]
>>> f(my_list)
[[['Z', ['C', 'Z']]], ['C', 'D'], ['E'], ['F', 'G'], ['H']]