Apr-26-2021, 10:55 AM
Hello
My number of sublists is in this line:
And I want to create a for loop till the this number. For instance if number_of_sublist=2, then I need to create 2 forloop:
If number_of_sublist=4, then I need to create 4 for loop like that:
How can I do that in an efficient way?
My number of sublists is in this line:
1 2 |
number_of_sublist = sum ( len (x) for x in incoming) |
1 2 |
for x in incoming: for y in x: |
If number_of_sublist=4, then I need to create 4 for loop like that:
1 2 3 4 5 |
for x in incoming: for y in x: for z in y: for t in z: ... |