摘要: class parent(object): def implicit(self): print("Parent implicit()") def override(self): print("Parent override()") def altered(self): print("Parent a 阅读全文
posted @ 2019-05-14 16:28 华小电 阅读(3495) 评论(0) 推荐(0) 编辑
摘要: 输出结果: 运行结果: 阅读全文
posted @ 2019-05-14 15:50 华小电 阅读(356) 评论(0) 推荐(0) 编辑
摘要: class Song(): def __init__(self,lyrics): self.lyrics=lyrics def sing_a_song(self): for line in self.lyrics: print(line) happy=Song(["Happy birthday to you", "Happy... 阅读全文
posted @ 2019-05-14 14:58 华小电 阅读(976) 评论(0) 推荐(0) 编辑