子類別可以繼承父類別。
class Animal: def speak(self): pass class Dog(Animal): def speak(self): print("Woof!")
建立 Animal 和 Cat 類別