Skip to content

Instantly share code, notes, and snippets.

@Sadamingh
Created September 6, 2020 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sadamingh/0edb6f71040bbb8f286591742313a1f5 to your computer and use it in GitHub Desktop.
Save Sadamingh/0edb6f71040bbb8f286591742313a1f5 to your computer and use it in GitHub Desktop.
def fib(n: int) -> List[int]:
fib_seq = [0, 1]
while len(fib_seq) < n:
fib_seq.append(sum(fib_seq[-2:]))
return fib_seq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment