LogiQuest
Back to Object Oriented Programming
9

What is the output of the following code?

class T:
    @staticmethod
    def add(a, b):
        return a + b
    @classmethod
    def name(cls):
        return cls.__name__
print(T.add(2, 3), T.name())
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.