Discuss / Python / 第二题

第二题

Topic source

胖头鱼

#1 Created at ... [Delete] [Delete and Lock User]
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))

  • 1

Reply