Discuss / Python / 第二题

第二题

Topic source

越聊越hi

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