Recursion
A recursive function calls itself on a smaller piece of the problem. Every recursive function needs a base case, an input small enough to answer directly. Without one, or if the input never gets smaller, the calls go on until Python stops them.
Python limits how deep calls can nest, about 1000 frames by default
(sys.getrecursionlimit()). Past that you get RecursionError. Python does
not optimise tail calls, so even a "tail recursive" function hits the limit.
Recursion fits naturally shaped data: trees, nested lists, divide and conquer. For a simple chain like summing a list, a loop is faster and has no depth limit. In an interview, if your input could be 100,000 deep, say so and offer a loop with an explicit stack.
You can raise the limit with sys.setrecursionlimit, but that only moves the
wall and can crash the interpreter.
Run it, then call total_recursive on a list of 5,000 numbers to see the
error message.