1#filter function
2
3nums1 = [2,3,5,6,76,4,3,2]
4
5
6bads = list(filter(lambda x: x>4, nums1))
7print(bads)
8
1#Reduce function
2
3from functools import reduce
4list2 =[1,2,3,4,5]
5fins = reduce(lambda x,y:x+y, list2)
6print(fins)
7
8#o/p : 15
9
10# reduce similar to this concept
11list2 =[1,2,3,4,5]
12adds = 0
13for i in list2:
14 adds+=i
15print(adds)
16