''' factorial_oneliner.py get the factorial of integer n tested with Python27 and Python34 ''' fact = lambda n: [1,0][n>1] or fact(n-1)*n # test it ... print(fact(53)) ''' result ... second line is mpmath result for comparison 4274883284060025564298013753389399649690343788366813724672000000000000 4274883284060025564298013753389399649690343788366813724672000000000000 '''
Edited by mathwizurd: Fixed the wording
Edited by vegaseat
Are you able to help answer this sponsored question?
Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies.