I'm newbie to Python and am learning lambda
expressions at the moment. I was solving a tutorial program
Define a function
max_of_three()
that takes three numbers as arguments and returns the largest of them.
I've gone through this old post and tried without success:
>>> max_of_three = lambda x, y, z : x if x > y else (y if y>z else z)
>>> max_of_three(91,2,322)
91
Why it's not returning Z? It's X.