tokland at gmail.com writes: > On 22 oct, 20:35, Paul Rudin <paul.nos... at rudin.co.uk> wrote: > >> import operator >> def fact(x): >> return reduce(operator.mul, xrange(1,x)) > > Maybe: > > import operator > def fact(x): > return reduce(operator.mul, xrange(2, x+1), 1) Or just: reduce(operator.mul, xrange(1, x), 1)