from functools import reducedef prod(L): def multi(x, y): return x * y return reduce(multi, L)print(prod([3, 5, 7, 9]))def prod(x, y): return x * yL1 = [3, 5, 7, 9]print(reduce(prod, L1))
Sign in to make a reply
胖头鱼