fork(1) download
  1. def ifib():
  2. a = 1
  3. b = 1
  4. while True:
  5. yield a
  6. a, b = b, a + b
  7.  
  8. if __name__ == '__main__':
  9. for i, v in zip(range(15), ifib()):
  10. print(v, end=' ')
  11. print()
Success #stdin #stdout 0.02s 9152KB
stdin
Standard input is empty
stdout
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610