title: Python idiom to chain (flatten) an infinite iterable of finite iterables?
body: <p>Suppose we have an iterator (an infinite one) that returns lists (or finite iterators), for example one returned by</p>
  <pre><code>infinite = itertools.cycle([[1,2,3]])
  </code></pre>
  <p>What is a good Python idiom to get an iterator (obviously infinite) that will return each of the elements from the first iterator, then each from the second one, etc. In the example above it would return <code>1,2,3,1,2,3,...</code>. The iterator is infinite, so <code>itertools.chain(*infinite)</code> will not work.</p>
  <h3>Related</h3>
  <ul>
  <li><a href="https://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python">Flattening a shallow list in python</a></li>
  </ul>