Ask Your Question

Revision history [back]

Prehaps coud itertools.product be of some help:

from itertools import product
P = product(range(6), repeat=4)
for i,j,k,l in P:
    print(i,j,k,l)