Mutation Mystery Def Deep Copy Lst Returns A New List That Is A Deep Copy Of Ls

deep_copy

#Mutation Mysterydef deep_copy ( lst) :""Returns a new list that is a deep copy of lst.>>> x = [[0, ‘a’], [1, ‘b’], [2, ‘c’ ] ]>>> y = deep_copy (x)>>> y[0] [1] = ‘z’>>> y[[O, ‘z’], [1, ‘b’], [2, ‘c’]]>>> X[[o, ‘a’], [1, ‘b’], [2, ‘c’]]>>> x = [[0, ‘a’], [1, ‘b’], [2, ‘c’] ]>>> z = deep_copy (x)>>> z [0] [1] = ‘z’>>> Z[[O, ‘z’], [1, ‘b’], [2, ‘c’]]>>> X#x should not change[[O, ‘a’], [1, ‘b’], [2, ‘c’]]IIIIII"xx* YOUR CODE HERE ***"

Need your ASSIGNMENT done? Use our paper writing service to score good grades and meet your deadlines.


Order a Similar Paper Order a Different Paper