Skip to content

Instantly share code, notes, and snippets.

@laowantong
Created May 18, 2020 09:58
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 laowantong/30bb2213e82839e095efa2553f7a91f5 to your computer and use it in GitHub Desktop.
Save laowantong/30bb2213e82839e095efa2553f7a91f5 to your computer and use it in GitHub Desktop.
%%paroxython
def fibonacci(n):
result = []
(a, b) = (0, 1)
while a < n:
result.append(a)
(a, b) = (b, a + b)
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment