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…