[Python] How to list and count combinations of 4 elements without repeated previous combinations with the all the same 4 elements

import numpy as np

# Combinations of 4 elements without repeats inter-combination elements

print("List of combination without repeated previous combinations with the same elements ")
t = np.empty((100, 100))
y = 0
p = 0
for d in (11, 3, 7, 1):
    for c in (11, 3, 7, 1):
        for b in (11, 3, 7, 1):
            for a in (11, 3, 7, 1):
                i = a * b * c * d
                p += 1
                if i not in t:
                    t = np.append(t, i)
                    print("{} {} {} {}".format(d, c, b, a))
                    y += 1
print("total combinations")
print(p)
print("number of combinations without repeated previous combinations with the same elements")
print(y)

Comments