Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Recursion in Python (Overview)

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.

Download

Sample Code (.zip)

3.9 KB

Download

Course Slides (.pdf)

1.2 MB

Become a Member to join the conversation.