3 ms·
Not only that but in python 3.8, it can be written: def factorial(n): return math.prod(range(1,n+1))
by messe 7y ago
Not only that but in python 3.8, it can be written:
def factorial(n):
return math.prod(range(1,n+1))
- estomagordo 7y agoNice!