Q. What is the output of the following code?
def foo(k):
k[0] = 1
q = [0]
foo(q)
print(q)
def foo(k):
k[0] = 1
q = [0]
foo(q)
print(q)
β
Correct Answer: (B)
[1].
You must be Logged in to update hint/solution