E is the combination of a, b, c and d. D is the final result. So the result of e should be the same of d. But it's not. What am I doing wrong?
result of d = [24, 42, 30, 42, 48, 36]
result of e = [42, 42, 48, 36]
numbers = [2,4,7,2,5,3,7,8,1,6]
def mapping():
a = list(filter(lambda x : x > 3, numbers))
print(a)
b = list(map(lambda x : x * 3, a))
print(b)
c = list(filter(lambda x : x > 10, b))
print(c)
d = list(map(lambda x : x * 2, c))
print(d)
e = list(filter(lambda x : x > 3, map(lambda x : x * 3, filter(lambda x : x > 10, map(lambda x : x * 2, numbers)))))
print(e)
mapping()
filters foreare applied inside-out. Meaning, thelambda x : x > 10is applied first. Essentially, the reverse order is followed fore.