[Tutor] Lists...

alan.gauld@bt.com alan.gauld@bt.com
Sun, 3 Jun 2001 21:00:34 +0100


> def intersect_eas(L1, L2):
>     '''The easiest way for Alan G, requires nested_scopes'''
>     return filter(lambda x: (x in L2), L1)

How does it require nested scopes?
lambda and filter are builtin, 
and x,L1 and L2 are all locals.

But I accept its not highly performant - that wasn't part 
of the original question... ;-)

Alan G