+ 1

Factorial of 'n' number using reduce()

1st Oct 2018, 6:27 AM
Nadeem Haque
Nadeem Haque - avatar
3 Réponses
+ 4
from functools import reduce reduce(lambda x, y: x*y, [1,2,3,4])
1st Oct 2018, 6:46 AM
Oma Falk
Oma Falk - avatar
0
ft.reduce(lambda x,y: x*y, range(1,x+1))
21st Jun 2019, 6:40 PM
Srinath Gopinathan
0
Given a number ‘n’, output its factorial using reduce(). input should be 1
12th Apr 2020, 10:42 AM
Abhishek Jha
Abhishek Jha - avatar