Python lambda is another way or you can say a fancy way of saying function. Other than its name, there is nothing obscure, intimidating or cryptic about it. So when you read that following line, just replace lambda by function in your mind.
mult3 = filter(lambda x: x % 4 == 0, [1, 2, 3, 4, 5, 6, 7, 8, 9])
Output:- 4,8
So the above code with lambda just defines a function of x. Some other languages, like R, say it explicitly:
def filterfunc(x):
return x % 4 == 0
mult3 = filter(filterfunc, [1, 2, 3, 4, 5, 6, 7, 8, 9])
Output:- 4,8
So the above two code examples show us that the lambda function is more efficient because it replaces large functions in a minimum number of lines.