you don' always have to start from scratch when writing class if the class you're writing is specialized version of another class you wroteyou can use inheritance when one class inherits from anotherit automatically takes on all the attributes and methods of the first class the original class is called the parent classand the new class is the child class the child class inherits every attribute and method from its parent class but is also free to define new attributes and methods of its own the __init__(method for child class the first task python has when creating an instance from child class is to assign values to all attributes in the parent class to do thisthe __init__(method for child class needs help from its parent class as an examplelet' model an electric car an electric car is just specific kind of carso we can base our new electriccar class on the car class we wrote earlier then we'll only have to write code for the attributes and behavior specific to electric cars let' start by making simple version of the electriccar classwhich does everything the car class doeselectric_car py class car()""" simple attempt to represent car ""def __init__(selfmakemodelyear)self make make self model model self year year self odometer_reading def get_descriptive_name(self)long_name str(self yearself make self model return long_name title(def read_odometer(self)print("this car has str(self odometer_readingmiles on it "def update_odometer(selfmileage)if mileage >self odometer_readingself odometer_reading mileage elseprint("you can' roll back an odometer!"def increment_odometer(selfmiles)self odometer_reading +miles class electriccar(car)"""represent aspects of carspecific to electric vehicles ""