python基礎學習筆記(二)類和對象

類和子類 class bird(object): def __init__(self,sound): #magic mehod 先後兩個下劃線 如__add__() self.sound=sound #__dict__() print("init sound:",sound) def chirp(s
相關文章
相關標籤/搜索