Examveda

What will be the output of the following Python code?
l=[2, 3, [4, 5]]
l2=l.copy()
l2[0]=88
l
l2

A. [88, 2, 3, [4, 5]]
[88, 2, 3, [4, 5]]

B. [2, 3, [4, 5]]
[88, 3, [4, 5]]

C. [88, 2, 3, [4, 5]]
[2, 3, [4, 5]]

D. [2, 3, [4, 5]]
[2, 3, [4, 5]]

Answer: Option B


This Question Belongs to Python Program >> Functions In Python

Join The Discussion

Related Questions on Functions in Python