multiply = lambda x,y:x*y
print(multiply(3,2))
print((lambda x,y:x**y)(4,2))
numbers = list(range(20))
print(numbers)
result = list(filter(lambda x:x%2==0,numbers))
print(result)
result = list(map(lambda x:x*2,numbers))
print(result)
from functools import reduce
result = reduce(lambda x,y:x+y,numbers)
print(result)
資料來源:https://www.learncodewithmike.com/2019/12/python-lambda-functions.html