Tricky MCQ set number 00257

1. What is the output of the following code? def foo(k): k = [1] q = [0] foo(q) print(q) a) [0]. b) [1]. c) [1, 0]. d) [0, 1]. AnswerAnswer: a [Reason:] A new list object is created in the function and the reference is lost. This can be checked by comparing the id of…


This content is for paid premium members only.
You can view complete answer after activation your membership.


Need only one answers. Simply buy single day pass and email. We will send answers for this question.
Login Buy membership