Have you wanted to understand recursion and how to use it in Python? Are you familiar with the call stack and how it relates to tracebacks? This week on the show, Al Sweigart talks about his new book, “The Recursive Book of Recursion.”
Recursion is one of those concepts held as a tenet of high-level computer science priesthood. Al explains the fundamentals of writing recursive functions and a critical missing piece in understanding how they operate, the call stack. After completing his research, he concluded that it’s a technique that you should understand but rarely use.
He also shares the few cases where recursion is an appropriate solution. Along the way, we talk about directed acyclic graphs, solving mazes, exploring file trees, and creating fractal images.
Course Spotlight: Caching in Python With lru_cache
Caching is an essential optimization technique. In this video course, you’ll learn how to use Python’s @lru_cache decorator to cache the results of your functions using the LRU cache strategy. This is a powerful technique you can use to leverage the power of caching in your implementations.
Topics:
Show Links:
Level up your Python skills with our expert-led courses: