# One line python code to calculate the factorial of a number - pythonsnippets.dev # using reduce function reduce(lambda x, y: x * y, range(1, n+1))