Search code examples
pythonnested-loops

How to use more than 20 nested for loops in python3 program without any exception of too many statically nested blocks?


I am upto creating a lookup table for a Human modelling software, Makehuman I have to translate its scale into real world metric scale for that I am creating lookup tables. It has 25 parameters that needs to be varied, I am using nested for loops for that and store values finally in database SQlite . Please anyone tell me how can I modify my code or use some other technique to overcome this exception, because this has to run anyhow for the completion of my project.

Thank You.


Solution

  • Use itertools module over loops...

    https://docs.python.org/2/library/itertools.html