Examveda

What will be the output of the following Python code?
l1=[10, 20, 30, [40]]
l2=copy.deepcopy(l1)
l1[3][0]=90
l1
l2

A. [10, 20, 30, [40]]
[10, 20, 30, 90]

B. Error

C. [10, 20, 30 [90]]
[10, 20, 30, [40]]

D. [10, 20, 30, [40]]
[10, 20, 30, [90]]

Answer: Option C


This Question Belongs to Python Program >> Functions In Python

Join The Discussion

Related Questions on Functions in Python