Discuss / Python / 使用 Reduce

使用 Reduce

Topic source
from functools import reduce

def product(*args):
    return reduce(lambda x, y: x*y, args)

  • 1

Reply