I need a more optimal way of searching for line count for permutations with repeating. It works fine with smaller values, but in this case, it needs to go through 26 ^ 12 lines to check correct permutation. Any help?
from itertools import product
count = 0
for i in product(list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), repeat=12):
count += 1
if ''.join(i) == "INTELLIGENCE":
print(count)