Discuss / Python / 练习2

练习2

Topic source

析瓜米米

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

from functools import reduce def prod(L): def f(x,h): y=x*h return y return reduce(f,L)

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


  • 1

Reply