Here\'s my approach to factorials:
def factorial(n): \'\'\'Returns factorial of n\'\'\' r = 1 for i in range(1, n + 1): r *= i return
You do realize that factorial(100000) is aproximately 2.8242294080×10^456,573 That's why it's slow, it's huge.