Hey all. I have this program where I need a variable number of for loops. For eg. the program i use to find the pythogorean triplets is
for n1 in range(100): for n2 in range(100): for n3 in range(100): if n1**2+n2**2 == n3**2: print str(n1**2) + '+' + str(n2**2) + '=' + str(n3**2)
Now if I needed n number of for loops (I will also need their vars) how do I dot it ?
Also, please dont give a solution which works only for this.