QuestionQ48

VerifiedFunctions and Exceptions

What is the expected output from the following code?

Question Image

Explanation

Reassigning a function parameter affects only that local name, so x remains 3. Mutating the list through p2[0] modifies the same list referenced by y, making y[0] equal to 42.

Community Discussion

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