Sail E0 Webinar
Question
What is the output of the following code?import copya=[10,23,56,[78]]b=copy.deepcopy(a)a[3][0]=95a[1]=34print(b)
Options:
A .  [10,34,56,[95]].
B .  [10,23,56,[78]].
C .  [10,23,56,[95]].
D .  [10,34,56,[78]].
Answer: Option B


The above copy is deepcopy. Any change made in the original list isn't reflected.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers