Created
November 9, 2017 20:50
-
-
Save sepulworld/764fd7fb4da030981388a87c55530a2a to your computer and use it in GitHub Desktop.
Fibonacci_list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fibonacci(max): | |
x, y = 0, 1 | |
while x < max: | |
yield x | |
x, y = y, x + y | |
fib_list = [n for n in fibonacci(1000)] | |
print("here is the fib_list: {}".format(fib_list)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment