Pytest a nice Fibonacci example
This is a nice implementation of the Fibonacci function. If we look at the way we can use it we see that it works well for 10.
def fib(n):
a, b = 1, 1
for _ in range(1, n):
a, b = b, a+b
return a
from fibonacci import fib
print(fib(10))
Output:
55