I have this part of a code:
N = 4
coa = []
for a in range(N):
for b in range(N):
for c in range(N):
for d in range (N):
coa.append(a,b,c,d)
Basically, I need to concatenate as many for-loop as the number N
. Therefore, if N
had been equal to 6
, I would have had to add other two for-loops with letters e
and f
and to add the same letters insidecoa.append()
. Is there a possibility to do that automatically, meaning that by varying the integer value of N, all that is done without typing it?