class ParentClass:
    def print\_self(self):
        print("Parent")

class ChildClass(ParentClass):
    def print\_self(self):
        print("Child")

child_instance = ChildClass()
child_instance.print_self() # => Child
Comments