I just have a question. how to use abstract functions without lambda?
say I have two list
a = [1,2,3,4,5]
b = [2,4,6]
if I want to print all the elements both appear in A and B,
with lambda:
def f():
print reduce (list.__add__ , map (lambda x: filter (lambda y: x == y, b), a))
how to do it without lambda?
i mean i’m just using helper functions instead of lambda
How do you get the intersection of two sets? If you use the
setdata type, you can just use&for union: