I am trying to print the factorial of a number using recursion by printing like this:
5 x 4 x 3 x 2 x 1=120
I just want this (5 X 4 x 3 x 2 x 1) part. I am trying a list comprehension, but not able to join with the "x" sign.
def factorial(n):
if n==0 or n==1:
return 1
else:
return n*factorial(n-1)
n=(int(input()))
print(([i for i in range(n,0,-1)]),"=",factorial(n))