You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
programming-basics-2022/08_python/definition/def_cls.py

13 lines
190 B

class C:
f = 50
a, b = 1, 1
for _ in range(10):
a, b = b, a + b
print(a, b)
def __init__(self, a, b):
print(self)
self.a = a
self.b = b