using functoools to generate new functions from existing ones!
Lets start with a very basic example which demonstrates why we might need functools.partial in the first place, then we will look into a more concrete example.
we have a power function which is used to compute powers obviously ;)
Now suppose we want to introduce some custome functions which make use of power function
In all the above cases we can see that the new function is generated by utillising the older funciton by just pre-determining one argument. in case of square()2 is fixed while in case of cube()3 is fixed.
Can we can do something better to achieve the same functionality as above? Yes!
lets see how.
using functools.partial we were able to create new functions from existing one! :)