Newer
Older
import math
def fibonacci(n):
"""return frist n elements of the fibonacci sequence with seeds 0 and 1"""
res = [0, 1]
for i in range(n-3):
res.append(res[-1] + res[-2])
return res
import math
def fibonacci(n):
"""return frist n elements of the fibonacci sequence with seeds 0 and 1"""
res = [0, 1]
for i in range(n-3):
res.append(res[-1] + res[-2])
return res