another nice way of writing above code is shown below here (*args and **kwargsare usedwhich takes all the arguments and keyword arguments of the function funcex py def addone(myfunc)def addoneinside(*args**kwargs)print("adding one"return myfunc(*args**kwargs return addoneinside def subthree( )return result addone(subthree print(subthree( )print(result( ) outputs adding one nowin the below codethe return value of addone is stored in the 'subthreefunction itself (line ) funcex py def addone(myfunc)def addoneinside(*args**kwargs)print("adding one"return myfunc(*args**kwargs return addoneinside def subthree( )return subthree addone(subthree print(subthree( )outputs adding one lastlyin pythonthe line in above codecan be replaced by using decoratoras shown in line of below code funcex py def addone(myfunc)def addoneinside(*args**kwargs)print("adding one"return myfunc(*args**kwargs return addoneinside @addone def subthree( )return print(subthree( )outputs adding one decorators