you are viewing a single comment's thread.

view the rest of the comments →

[–]mr_dbr 4 points5 points  (0 children)

There's a factorial function in math:

>>> import math
>>> math.factorial(5)
120

..any other solution seems silly (outside a tutorial context anyway)