Question: Create a lambda function 'greater', which takes two arguments x and y and return x if x>y otherwise y.
If x = 2 and y= 3, then the output should be 3. Input: 9,3 Expected Output: 9
Answer:
f(a,b)=lambda x :a if a>b else b #code written here
f(9,3) #input
Error message:
File "<ipython-input-30-a6687330a9f4>", line 11
f(a,b)=lambda x :a if a>b else b
^
SyntaxError: can't assign to function call