If your code is so deep nested, there is maybe a different problem.
If the structure is deep nested, you could also create a list/tuple with all elements, which should be used for product-iteration.
Then you can call
If the structure is deep nested, you could also create a list/tuple with all elements, which should be used for product-iteration.
Then you can call
product(*arguments)
.from itertools import product my_range1 = range(3) my_range2 = range(2) my_range3 = range(4) my_range4 = range(2) my_ranges = (my_range1, my_range2, my_range3, my_range4) for values in product(*my_ranges): print(values)But maybe you can solve your problem differently (XY-Problem?).
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!