QuestionQ11

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

What is the expected output of this code?

Question Image

Explanation

The lambda evaluates 2 % 2 as 0 and 1 % 2 as 1. The function subtracts these values, producing 0 - 1, or -1.

Community Discussion

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