Back
Close

Beginner Python Concepts

a-Rye
12.9K views

Recursion

To demonstrate recursion, we need to define a function. The concept is where we have a function that calls itself until a condition is met. It's also easy to write infinite loops with recursion. The condition needing to be met is known as the Base Case. Once we reach that Base Case, we return all the data we've calculated.

Try it out here!
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants