| 1 | initial version |
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)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.