1. def fun (x):
    2. return x**2
    3. a = [1,2,3,4,5]
    4. b = list(map(f,a))
    5. //or
    6. b = [x for x in map(f,a)]//1491625
    1. def fun(n):
    2. return n%2 == 0
    3. a = [1,2,3,4]
    4. b = [x for x in filter(fun,a)] //b =[2,4]