QuestionQ126

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

What is the expected output from the following code?

Question Image

Explanation

The function composes the supplied callables as x(y(z)). The inner lambda evaluates 2 // 2 to 1; the outer lambda then evaluates 2 * 1 to 2. Python’s // operator performs floor division. Python Language Reference: Expressions

Learn more

Community Discussion

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