Question: Consider the following pieces of code:class SPrototype ( object ) : A prototype base class using shallow copy def

Consider the following pieces of code:class SPrototype(object):""" A prototype base class using shallow copy """def clone(self):""" Return a clone of self """return copy.copy(self)class SRegister(SPrototype):""" Sub-class of SPrototype """def __init__(self, names=[]):self.names = namesAfter the given code compiles, the following lines of code are executed on cmd:>>> r1=SRegister(names=['amy','stu','jack'])>>> r2=r1.clone()Now, suppose the user added a name to the names register of instance r1, as such:>>> r1.names.append('bob')What will be the output of the following code?>>> r2.namesThis type of question contains radio buttons and checkboxes for selection of options. Use Tab for navigation and Enter or space to select the option.optionA['bob']optionB['amy', 'stu', 'jack', 'bob']optionC['amy','stu','jack']optionDTrue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!