• 2022-06-07
    以下代码中,实例方法定义正确的是()
    A: class Student: def setName(self,name): self.name=name
    B: class Student: def setName(name): self.name=name
    C: class Student: def setName(self): self.name=name
    D: class Student: def setName(name,self): self.name=name