iteration

Repeating a block of steps in a loop, as opposed to having a function call itself.

In more detail

Any recursive function can be rewritten iteratively, often with an explicit stack standing in for the call stack. An iterative version avoids Python's recursion limit and the memory of many stack frames. Iterative binary search and iterative depth-first search are common examples.

Related terms

Taught in

References