Python Developer — Hard
Key points
- `partial` from `functools` allows creating new functions with pre-set arguments
- `square` and `cube` are partial functions with the `exp` argument pre-set to 2 and 3 respectively
- The `power` function calculates the base raised to the power of the pre-set `exp`
Ready to go further?
Related questions
