def func_compute(n):
return lambda x: x * n
result = func_compute(2)
print("15 * 2 =", result(15))
result = func_compute(3)
print("15 * 3 =", result(15))
#coding #beginner
Pythonist.ru - помощь в подготовке к собеседованию на позицию Python Developer.
def func_compute(n):
return lambda x: x * n
result = func_compute(2)
print("15 * 2 =", result(15))
result = func_compute(3)
print("15 * 3 =", result(15))
#coding #beginner