Inheritance is a feature used in object-oriented programming; it refers to defining a new class with less or no modification to an existing class. The new class is called the derived class, and from one which it inherits is called the base. Python supports inheritance; it also supports multiple inheritances. A class can inherit attributes and behavior methods from another class called subclass or heir class.

Example of inheritance:

# Example file for working with classes
class myClass():
  def method1(self):
      print("Guru99")
         
 class childClass(myClass):
  #def method1(self):
        #myClass.method1(self);
        #print ("childClass Method1")
         
  def method2(self):
        print("childClass method2")     
          
def main():           
  # exercise the class methods
  c2 = childClass()
  c2.method1()
  #c2.method2()

if __name__== "__main__":
  main()