python中class person
时间: 2023-07-15 21:14:24 浏览: 111
person.class
class Person:
def __init__(self, name, age):
self.name = name
self.age = age
def introduce(self):
print(f"My name is {self.name} and I am {self.age} years old.")
阅读全文