面试题答案
一键面试from functools import reduce
nums = [1, 2, 3, 4, 5]
result = reduce(lambda x, y: x + y, filter(lambda x: x % 2 == 0, map(lambda x: x ** 2, nums)))
print(result)
from functools import reduce
nums = [1, 2, 3, 4, 5]
result = reduce(lambda x, y: x + y, filter(lambda x: x % 2 == 0, map(lambda x: x ** 2, nums)))
print(result)