class Person:
name = "Кристи"
age = 10
def set(self, name, age):
self.name = name
self.age = age
lena = Person()
lena.set = ("Лена", 25)
print(lena.name + " " + str(lena.age))
ivan = Person()
ivan.set = ("Иван", 33)
print(ivan.name + " " + str(ivan.age))
Кристи 10
Кристи 10
ivan.set("Иван", 33)
class Person:
name = "Кристи"
age = 10
def __init__(self, name, age):
self.name = name
self.age = age
def set(self, name, age):
self.name = name
self.age = age
ivan = Person('Иван', 33)