What will be displayed by the following code?

Loading

Choose the correct option.

What will be displayed by the following code?
class A:
    def __str__(self):
        return“A”
class B(A):
    def __init__(self):
        super().__init__()
class C(B):
    def __init__(self):
        super().__init__()
def main():
    b = B()
    a = A()
    c = C()
    print(a, b, c)
main()

A. C C C
B. A B C
C. A A A
D. B B B

Leave a Comment