Comment on The Python IAQ: Infrequently Answered QuestionsparentComments−Kilimanjaro15yWhich I guess can be written like def fact(n): return 1 if n<=1 else n*fact(n-1)−danio15yunfortunately not on python 2.4, which is the version we have on our production servers (2 yr old Linux)−Kilimanjaro15yOne liner def fact(n): return n*fact(n-1) if n>1 else 1
Comments
Which I guess can be written like
unfortunately not on python 2.4, which is the version we have on our production servers (2 yr old Linux)
One liner