Popular recipes tagged "iteration" and "nested" but not "map"http://code.activestate.com/recipes/tags/iteration-map+nested/2012-02-18T01:34:55-08:00ActiveState Code RecipesEasily Write Nested Loops (Python)
2012-02-18T01:34:55-08:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578046-easily-write-nested-loops/
<p style="color: grey">
Python
recipe 578046
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/iteration/">iteration</a>, <a href="/recipes/tags/nested/">nested</a>).
</p>
<p>The "nest" generator function in this module is provided to make writing
nested loops easier to accomplish. Instead of writing a for loop at each
level, one may call "nest" with each sequence as an argument and receive
items from the sequences correctly yielded back to the caller. A test is
included at the bottom of this module to demonstrate how to use the code.</p>