Factorial of a number - 2

Question

Find the factorial (n!) of a number n.

Solution

import operator
from functools import reduce
print(reduce(operator.mul, range(1,10)))

Explanation