Intermediate
Python
Q47 / 101
What does functools.lru_cache do?
Correct! Well done.
Incorrect.
The correct answer is B) Caches function results based on arguments, returning cached results on repeat calls
B
Correct Answer
Caches function results based on arguments, returning cached results on repeat calls
Explanation
@lru_cache(maxsize=128) memoizes function results, making repeated calls with the same arguments O(1) instead of recomputing.
Progress
47/101