Skip to content

Instantly share code, notes, and snippets.

@computer-tutor
Created April 28, 2020 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save computer-tutor/7b62188b2205701a69dba8ab1ecc6479 to your computer and use it in GitHub Desktop.
Save computer-tutor/7b62188b2205701a69dba8ab1ecc6479 to your computer and use it in GitHub Desktop.
def make_fibonacci(n):
fib = []
a, b = 0, 1
for i in range(n):
a, b = b, a+b
fib.append(a)
return tuple(fib)
make_fibonacci(8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment