0 votes
in Python by

What is the output of the following code?

class A:

    @classmethod

    def getC(self):

        print('In Class A, method getC.')

class B(A):

    pass

b = B()

B.getC()

b.getC()

a)

In Class A, method getC. 

In Class A, method getC.

b) TypeError

c) In Class A, method getC.

d) AttributeError

1 Answer

0 votes
by

a)

In Class A, method getC. 

In Class A, method getC.

Related questions

0 votes
asked Jan 18, 2021 in Python by SakshiSharma
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...