1. What is the output of the following piece of code?
class A:
def str(self):
return '1'
class B(A):
def init(self):
super().init()
class C(B):
def init(self):
super().init()
def main():
obj1 = B()
obj2 = A()
obj3 = C()
print(obj1, obj2,obj3)
main()
a) 1 1 1
b) 1 2 3
c) ‘1’ ‘1’ ‘1’
d) An exception is thrown
Answers
Answered by
5
it will be option c.
if it is correct please follow me and Mark it as brainy please.
if it is correct please follow me and Mark it as brainy please.
anitacort100:
okay let me check it out,
Similar questions