Q. What will be the output of the following Python program?
Code:
def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
β
Correct Answer: (D)
True