Hello, I have scratchy ideas of Generators, Iterators and Coroutines. (from PEPs and other tutorials). I want to implement a coroutine- in which routine1 will print odd and routine2 will print even numbers infinitely in a fashion such as:
routine1:
print odd
yield to routine2
routune2:
print even
yield to routine1
Have some rough ideas of the code that should do this, but not able to get it in shape. I do not want the code. But, I would appreciate pseudo code style pointers for the same. Thank you.