W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
python_class_4.py:
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()