Discuss / Python / task 2

task 2

Topic source

中大-雪山

#1 Created at ... [Delete] [Delete and Lock User]

-- coding: utf-8 --

from functools import reduce def prod(L): return reduce((lambda x, y: x * y), L)

print("3 * 5 * 7 * 9 =", prod([3, 5, 7, 9]))


  • 1

Reply