Just simple stuff...
Wednesday, November 26, 2008
Recursive lambda implementation factorial function in Python
It is easy to implement factorial function use recursive in Python, but how do you implement it by using recursive lambda in Python? Here is my try:
fact = lambda n: (n and n-1) and n*fact(n-1) or 1
Post a Comment