摘要:
#先定义类 #__init__方法用来为对象定制对象自己独有的特征 class LuffyStudent: school = "Luffycity" # 数据属性 # stu1,"王大拿","女",18 def __init__(self,name,sex,age): self.Name = nam 阅读全文
摘要:
class LuffyStudent: school = "Luffycity" # 数据属性 def learn(self): # 函数属性 print("is Learning") def eat(self): # 函数属性 print("is eating") def sleep(self): 阅读全文