diff --git a/README.md b/README.md index eafb872..44e7c78 100644 --- a/README.md +++ b/README.md @@ -628,9 +628,7 @@ from functools import lru_cache @lru_cache(maxsize=None) def fib(n): - if n < 2: - return n - return fib(n-1) + fib(n-2) + return n if n < 2 else fib(n-1) + fib(n-2) ``` ```python