inheritance to avoid code duplication
What no, inheritance is not for code sharing
Sound bite aside, inheritance is a higher level concept. That it “shares code” is one of several effects.
The simple, plain, decoupled way to share code is the humble function call, i.e. static method in certain langs.
absolute beginner? Start at https://www.hedycode.com/
Which will ultimately lead into vanilla Python. This is the creator explaining why Hedy is uniquely designed for learning: https://www.youtube.com/watch?v=fmF7HpU_-9k