QuestionQ42

VerifiedMiscellaneous (List Comprehensions, Lambdas, Closures, I/O)

Which of these lambda definitions are valid?

Choose two
Explanation

Python lambda expressions require lambda, followed by parameters, a colon, and one expression. They cannot use = to define the function or include a return statement. A tuple expression and an arithmetic expression are both valid lambda bodies.

Community Discussion

No comments yet. Be the first to start the discussion!