Examveda

What will be the output of the following Python program?
def foo(x):
    x[0] = ['def']
    x[1] = ['abc']
    return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))

A. Error

B. None

C. False

D. True

Answer: Option D


This Question Belongs to Python Program >> Introduction To Python

Join The Discussion

Related Questions on Introduction to Python