> 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.