Inheritance – OOP Python

Inheritance simply means, accessing parent class elements from child classes

class Shape(): 
# Parent Class Shape
	def className(self): 
		print('Parent Class')
class Circle(Shape): 
# Child Class Circle
	def isFigure(self): 
		print('Child Class')

shape = Circle() # An Object of Child Class
#calling both Parent and Child method using same class object 
print(shape.className(), shape.isFigure())