Dynamic Programming And Recursion In Python Example