Inheritance and super Example in Python

I always forget how to write inheritance in Python. Today, I saw a good example in Educative.io which is easy for me to understand and remember.

# Parent class
class Vehicle:
fuelCap = 90
def __init__(self, color, model):
self.color = color
self.model = model
def printDetails(self):
print(self.color)
print(self.model)
# Sub class
class Car(Vehicle):
fuelCap = 50
def __init__(self, color, model, doors):
# inheritant constrator from parent class
Vehicle.__init__(self, color, model)
self.doors = doors
def printCarDetails(self):
# inheritant method from parent class
self.printDetails()
print(self.doors)
def printFuel(self):
# super instead of Parent class name
print("Parent fuelCap: ",super().fuelCap)
print("Vehical fuelCap:", Vehicle.fuelCap)
print("Self fuelCap:", self.fuelCap)
car1 = Car("Red", "BMW", 4)
car1.printCarDetails()
### output
Red
BMW
4
Parent fuelCap: 90
Vehical fuelCap: 90
Self fuelCap: 50