1.

How do you call a superclass method in Python?

Answer»

Here’s how to call a superclass METHOD in PYTHON:

Example

class PARENT:
    def show(self):
        PRINT("Inside Parent class")
 
class Child(Parent):
      
    def display(self):
        print("Inside Child class")

obj = Child()
obj.display()
obj.show()

Output

Inside Child class
Inside Parent class



Discussion

No Comment Found