remove a list from a list

Fredrik Lundh fredrik at pythonware.com
Fri Nov 17 20:39:54 CET 2006


Fredrik Lundh wrote:

>> What is a *nice* way of doing it?
> 
> r = [i for i in e if i not in l]

and swap l and e, add a few calls to lower, and start using better 
variable names in the future.

</F>




More information about the Python-list mailing list