adplus-dvertising
frame-decoration

Question

What is the output of the following code?
a=[10,23,56,[78]]
b=list(a)
a[3][0]=95
a[1]=34
print(b)

a.

[10,34,56,[95]].

b.

[10,23,56,[78]].

c.

[10,23,56,[95]].

d.

[10,34,56,[78]].

Posted under Python

Answer: (c).[10,23,56,[95]].

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following code?