定义类 class Student: def __init__(self, name, xuehao, phone): self.name = name self.xuehao = xuehao self.phone = phone def say_hello(self): print("你好, 我是{n}".format(n=self.name)) def __print_sentence(self): print("我的电话号码是{m}".format(m=self.phone))