637просмотров
50.6%от подписчиков
31 августа 2023 г.
Score: 701
Дан код и вывод class A: def init(self, x): self.x = x def call(self): return self.x
class B: def init(self, x): self.x = x def method(self): return self.x
class C: def init(self, x=3): self.x = x def repr(self): return str(self.x) a = A(1)
b = B(2)
c = C(3)
callables = # ваш код
print([act() for act in callables]) #Вывод: [1, 2, 3]