Created
April 9, 2017 07:38
-
-
Save blha303/62b4de02826bb404c28f29a83ccf0cf4 to your computer and use it in GitHub Desktop.
gotcha fibonacci right here m8
This file contains hidden or 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
from __future__ import print_function | |
from sys import stdout | |
def fib(x,y,f=stdout): | |
print(x,file=f) | |
z = x + y | |
return y,z | |
def main(): | |
n = (0,1) | |
while True: | |
n = fib(*n) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment