January 2017
Intermediate to advanced
606 pages
14h 1m
English
8.1 Recursive Solutions for Problems on Numeric Data
8.2 Recursive Solutions for Problems on Strings
8.3 Recursive Solutions for Problems on Lists
In the previous chapters, we have used functions for various programming tasks. When computation in a function is described in terms of the function itself, it is called a recursive function. Python allows a function to call itself, possibly with new arguments.
Recursion aims to solve a problem by providing a solution in terms of the simpler version of the same problem. A recursive function definition comprises two parts. The first part is the base part, which is the solution of the simplest version of the problem, often termed stopping ...