L=[1,2,3,4,5] def prod(L): def chengji(x,y): return(x*y) return reduce(chengji,L) print(prod(L))
Sign in to make a reply
Ryan_CL
L=[1,2,3,4,5] def prod(L): def chengji(x,y): return(x*y) return reduce(chengji,L) print(prod(L))