PYTHON CODING
- waclaw_koscielniak

- Jun 23
- 1 min read
def factory(n):
return lambda x: x ** n
square = factory(2)
cube = factory(3)
print(square(3), cube(2))
[Running] python3 -u "/Users/name/test/test37.py"
9 8
[Done] exited with code=0 in 0.053 seconds



Did you try it?