Recursion, the Fibonacci Sequence and Memoization || Python Tutorial || Learn Python Programming

Let’s explore recursion by writing a function to generate the terms of the Fibonacci sequence. We will use a technique called “memoization” to make the function fast. We’ll first implement our own caching, but then we will use Python’s builtin memoization tool: the lru_cache decorator.
Back to Top