Loading topic
if statements and loops, and work with basic lists. It also assumes you have seen the idea from the previous chapter: a recursive function is one that calls itself. Here we look at the part of a recursive function that does not call4 min readfactorial. Here you will see what Python does when a function calls itself, so that recursive code stops looking like a trick.5 min readitems[0], items[1:]), and have met the base case, the recursive case, and the leap of faith from earlier chapters. Here those ideas are applied to the most common recursive inputs in everyday 4 min readwhile loops. It also assumes you are comfortable with the earlier chapters on base cases, the recursive leap of faith, and tree recursion. You will see how a recursive function can split a problem into halves, solve ea5 min readf calls g, and g calls f. No function calls itself directly, but the group as a whole is recursive.5 min readRecursionError when recursion gets too deep, as the previous chapter showed. Here we look at a specific shape of recursive function, the tail-recursive form. In so5 min readRecursionError past its depth limit, and how the recursive Node tree and height function from earlier chapters work. Here you will learn how to remove the recursion from a function by managing 4 min read