A

Admin • 833.24K Points
Coach

Q. What is the output of the following code?

Code:
x = lambda a : a + 10
print(x(5))
  • (A) 10
  • (B) 5
  • (C) 15
  • (D) Error
  • Correct Answer - Option(C)
  • Views: 21
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

lambdas are concise functions and therefore, the result = 5 + 10 = 15

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.