Menu

[Solved]Copy Import Copy Deepcopy 1 2 3 10 11 B Copy C Deepcopy B 0 14 B 3 0 15 B 3 Append 20 C 1 Q37268023

from copy import copy, deepcopy
a = [1,2,3,[10,11]]
b = copy(a)
c = deepcopy(a)
b[0] = 14
b[3][0] = 15
b[3].append(20)
c[1] = 8
c[3][1] *= 2

print (a)
print (b)
print (c)

Draw a pictorial representation of the memory after the firstthree lines of code, and after the last statement (before the printstatements). Show all changes in the memory.

Expert Answer


Answer to from copy import copy, deepcopy a = [1,2,3,[10,11]] b = copy(a) c = deepcopy(a) b[0] = 14 b[3][0] = 15 b[3].append(20) c… . . .

OR


Leave a Reply

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