[EMAIL PROTECTED] a écrit : (snip - already answered) > > def fact(n): > total = 0 > n = int(n) > while n > 0: > total *= n > n -=1 > return total
You may be interested in a very different way to get the same result: from operator import mul def fact(n): return reduce(mul, xrange(1, n+1), 1) (snip) -- http://mail.python.org/mailman/listinfo/python-list