remove a list from a list

Rares Vernica rvernica at gmail.com
Fri Nov 17 13:29:11 EST 2006


Hi,

I have the following problem:

I have a list like
   e = ['a', 'b', 'e']
and another list like
   l = ['A', 'a', 'c', 'D', 'E']
I would like to remove from l all the elements that appear in e 
case-insensitive. That is, the result would be
   r = ['c', 'D']

What is a *nice* way of doing it?

Thanks a lot,
Ray




More information about the Python-list mailing list