t195.py 269 B

12345678910111213
  1. def foo(value = None):
  2. for i in [-1,0,1,2,3,4]:
  3. if i < 0:
  4. continue
  5. elif i == 0:
  6. yield 0
  7. elif i == 1:
  8. yield 1
  9. yield value
  10. yield 2
  11. else:
  12. yield i
  13. print list(foo())