ПЯ
Size: a a a
ПЯ
ПЯ
Р
AT
AT
Р
.
py3
class chislo(int):
def __init__(self, *a, **kw):
super().__init__()
def add(self, number):
return self + number
a = chislo(1)
print(a.add(2))
3
.
ПЯ
ПЯ
from operator import add
def func(x,*args):
if not args:
return x
else:
return args[0](x,args[1])
print(func(2,add,3))
ПЯ
.
.
ПЯ
ПЯ
from operator import add
def func(x,*args):
if not args:
return x
else:
return args[0](x,args[1])
print(func(2,add,3))
ПЯ
AT
ПЯ
ПЯ