Popular recipes by Colin Gillespie http://code.activestate.com/recipes/users/4029798/2007-01-30T09:16:34-08:00ActiveState Code RecipesA generator for an arbitrary number of 'for' loops (Python)
2007-01-30T09:16:34-08:00Colin Gillespiehttp://code.activestate.com/recipes/users/4029798/http://code.activestate.com/recipes/502194-a-generator-for-an-arbitrary-number-of-for-loops/
<p style="color: grey">
Python
recipe 502194
by <a href="/recipes/users/4029798/">Colin Gillespie</a>
(<a href="/recipes/tags/shortcuts/">shortcuts</a>).
</p>
<p>Python has a number of nice methods to handle 'for' loops. However, the situation often arises where you have a large number of nested loops. Using this solution reduces the number of loops to one.</p>