I am aware that two collections can be accessed simultaneously using
for i,j in zip([1,2,3],[4,5,6]):
print i,j
1 4
2 5
3 6
What I would like to do is something like this:
for i,j in [[1,2,3],[4,5,6]]:
print i,j
1 4
1 5
1 6
2 4
2 5
2 6
3 4
3 5
3 6
I want python to automatically create the nested for loop for me. I would like to avoid using many nested for loops in my code when the list dimension gets up to 5 or 6. Is this possible?