from functools import reduce
def f(acc, x):
acc[x] = x * 2
return acc
reduce(f, ["a", 3, (1,2)], {})
Post #2046
1.62K
Что выведет код?
PY Python Tasks & ML | Задачи по питону и машинному обучению @python_tasks · 8.5K subscribers from functools import reduce
def f(acc, x):
acc[x] = x * 2
return acc
reduce(f, ["a", 3, (1,2)], {})