strategy pattern move in silenceonly speak when it' time to say checkmate --unknown from time to timeyou might find yourself in position where you want to switch between different ways of solving problem you essentially want to be able to pick strategy at runtime and then run with it each strategy might have its own set of strengths and weaknesses suppose you want to reduce two values to single value assuming these values are numeric valuesyou have couple of options for reducing them as an exampleconsider using simple addition and subtraction as strategies for reducing the two numbers let' call them arg and arg simple solution would be something like thisdef reducer(arg arg strategy=none)if strategy ="addition"print(arg arg elif strategy ="subtraction"print(arg arg elseprint("strategy not implemented "def main()reducer( reducer( "addition"reducer( "subtraction"if __name__ ="__main__"main((cwessel badenhorst badenhorstpractical python design patterns