collection=7
A = [0,0,0,0,0,0]
k = 0
for n in range(collection):
    A[0] = n
    for nm in range(n+1):
        A[1] = nm
        for nma in range(nm+1):
            A[2] = nma
            for nmas in range(nma+1):
                A[3] = nmas
                for nmasd in range(nmas+1):
                    A[4] = nmasd
                    for nmasdf in range(nmasd+1):
                        A[4] = nmasdf
                        for nmasdfg in range(nmasdf+1):
                            A[5] = nmasdfg
                            print(A,end=" ")
                            print(k)
                            k += 1

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: