Last active 1491687500

gotcha fibonacci right here m8

Steven Smith revised this gist 1491723499. Go to revision

1 file changed, 15 insertions

fib.py(file created)

@@ -0,0 +1,15 @@
1 + from __future__ import print_function
2 + from sys import stdout
3 +
4 + def fib(x,y,f=stdout):
5 + print(x,file=f)
6 + z = x + y
7 + return y,z
8 +
9 + def main():
10 + n = (0,1)
11 + while True:
12 + n = fib(*n)
13 +
14 + if __name__ == "__main__":
15 + main()
Newer Older