I would like to make N nested for loops in python. E.g.:
for i in range(1,100):
block1=i
for j in range(1+i,100-i):
block2=j
for k in range(1+j,100-j):
. . .
nth for loop:
for nth in range(1+(prior for loop value),100-(prior for loop value))
In this specific instance, what I am trying to do is to check all possible combinations of values for a group of n variables, given that the variables be integers between 1 and 100. For example, if n is 3, then I want to check all possible combinations such as: 1,2,3 1,2,4 1,2,5 . . . 97,98,99.
Similarly if n is 4, I'd want to check: 1,2,3,4 1,2,3,5 1,2,3,6 . . . 96,97,98,99
(I don't need to check multiple instances of the same number. E.g. if n=3, 25,25,25 would be a wasted calculation.)
I would then perform some calculation using these n variables.
Thank you and please let me know if I could provide further clarification.