Here lambda is used to create a one-line function for factorials.

```
''' 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
'''
```

About the Author

Scientist