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

No comments:

Full Guide for using Bitnami Prometheus Operator Helm Chart with Additional Scrape Configuration

"The Prometheus Operator for Kubernetes provides easy monitoring definitions for Kubernetes services and deployment and management of...