View difference between Paste ID: jFG69AYs and 2sBYPDR7
SHOW: | | - or go back to the newest paste.
1
import functools
2
@functools.lru_cache()
3
def fib(iterations):
4
	a, b = 0, 1
5
	for _ in range(iterations):
6
		a, b = b, a+b
7
	return a