How can we copy an object in Python?
What will be the output of the given code? Explain your answer.
classParent (object): a=1
class Child1(Parent): pass
class Child2(Parent): pass
print Parent.a,Child1.a,Child2.a Child2.a=5
print Parent.a,Child1.a,Child2.a Parent.a=4
print Parent.a,Child1.a,Child2.a
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here