创建对象方法创建对象方法class Person: def __init__(self, name, age): self.name = name self.age = age def myfunc(self): print("Hello my name is " + self.name) p1 = Person("Bill", 63)p1.myfunc()