Inheritance
Read this for more on inheritance.
Chapter 18 Inheritance
The language feature most often associated with object-oriented programming is inheritance. Inheritance is the ability to define a new class that is a modified version of an existing class. In this chapter, I demonstrate inheritance using classes that represent playing cards, decks of cards, and poker hands.
If you don't play poker, you can read about it at http://en.wikipedia.org/wiki/Poker, but you don't have to; I'll tell you what you need to know for the exercises.
Code examples from this chapter are available from http://thinkpython2.com/code/Card.py
Source: Green Tea Press, http://greenteapress.com/thinkpython2/html/thinkpython2019.html This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 License.