БГ
return a + b + c, 2
def f2(a, b):
return a + b
f = compose([f1, f2])
не работает
Size: a a a
БГ
R3
s
БГ
AT
БГ
БГ
k
B
k
A
B
k
A
create test which will check that search for any char in English alphabet or any number from 0 to 9 will return number of results >0 except cases of search by 6, 9 and 0. It is not allowed to use loops inside the test body
БГ
def compose_unpack(chain):
if not any(map(callable, chain)):
raise ValueError("chain must be iterable of callables")
def composed(*args, **kwargs):
func, *funcs = chain
result = func(*args, **kwargs)
for func in funcs:
if isinstance(result, tuple):
result = func(*result)
else:
result = func(result)
return result
return composed
БГ
create test which will check that search for any char in English alphabet or any number from 0 to 9 will return number of results >0 except cases of search by 6, 9 and 0. It is not allowed to use loops inside the test body
B
A
БГ
БГ