strategy pattern def strategy_addition(arg arg )print(arg arg def strategy_subtraction(arg arg )print(arg arg def main()no_strategy strategyexecutor(addition_strategy strategyexecutor(strategy_additionsubtraction_strategy strategyexecutor(strategy_subtractionno_strategy execute( addition_strategy execute( subtraction_strategy execute( if __name__ ="__main__"main(againwe get the required resultstrategy not implemented - since we are already passing around functionswe might as well take advantage of having first-class functions and abandon the executor object in our implementationleaving us with very elegant solution to the dynamic-strategy problem def executor(arg arg func=none)if func is noneprint("strategy not implemented "elsefunc(arg arg def strategy_addition(arg arg )print(arg arg def strategy_subtraction(arg arg )print(arg arg