Recursion in Python

If you’re familiar with functions in Python, then you know that it’s quite common for one function to call another. In Python, it’s also possible for a function to call itself! A function that calls itself is said to be recursive, and the technique of employing a recursive function is called recursion.

It may seem peculiar for a function to call itself, but many types of programming problems are best expressed recursively. When you bump up against such a problem, recursion is an indispensable tool for you to have in your toolkit.

By the end of this video course, you’ll understand:

  • What it means for a function to call itself recursively
  • When recursion might be your best best for solving a problem
  • How you can implement recursion for various use cases in Python

Along the way, you’ll study several specific programming tasks where you can use recursion in Python. You’ll also explore alternatives to recursion.


[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Related Articles

Open Source Databases

We had a very fun and engaging chat with Matt Yonkovit who is the Chief Experience Officer at Percona, a service provider for open source databases like MySQL, PostgreSQL, MariaDB, and RocksDB. Matt has worked as a database architect for 10 years before transitioning into consulting roles at both MySQL and Sun Microsystems. In total, he’s been working with databases and open source for nearly 25 years.

Open Source Readiness

James has a lot of experience from both the developer side and the community side of open source. We dive deep into open source communities and enterprise involvement within those communities. Some of the topics we cover include: What is an open source readiness program and why should enterprises have one in place? Open source program offices and and the benefits of contributing to open source communities

Responses

Your email address will not be published. Required fields are marked *