# Inheritance

*noun*

say it: **“in-HAIR-ih-tuns”** **/ɪnˈhɛrɪtəns/**

Making a new class that starts with everything another class has, then adds or changes things, such as a Truck class built on Vehicle.

## What is **inheritance**?

**Inheritance** lets a new class start with everything another class has and then add or change things.

```python
class Vehicle:
    def start(self):
        print("Engine on")

class Truck(Vehicle):          # Truck gets start() for free
    def haul(self):
        print("Hauling cargo")

Truck().start()  # Engine on
```

## In a sentence

- “Through **inheritance**, Truck gets start() from Vehicle.”
- “**Inheritance** let the custom error class start from Exception.”

Level: Journeyman · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=3)

Updated: November 19, 2026

## In other subjects

- [Inheritance in C#](https://www.ask-codey.com/glossary/inheritance-c-sharp)
- [Inheritance in CSS](https://www.ask-codey.com/glossary/inheritance-css)
- [Inheritance in Java](https://www.ask-codey.com/glossary/inheritance-java)
- [Inheritance in JavaScript](https://www.ask-codey.com/glossary/inheritance-javascript)
- [Inheritance in OOP](https://www.ask-codey.com/glossary/inheritance-oop)

Source: https://www.ask-codey.com/glossary/inheritance
