Most efficient solution?

Alex new_name at mit.edu
Mon Jul 16 11:06:41 EDT 2001


> C = {}
> for item in B:
>     C[item] = 1
> 
> A = filter(C.get, A)

I guess that'll drop some elements from A that are in B but evaluate to
false, though.

Alex.



More information about the Python-list mailing list