This is code with 8 repitios possible of all charaters
from itertools import *
for i in product(['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'],repeat = 8):
b = (''.join(i))
print (b)
How can I do something like that - allow maximum 4 or 5 character repetition per 8-symbol string. As an example, 222abbccc or a3333abd.
Allow every symbol from the list to repeat from 1 to 4 times at any place in 8-symbol string, but keep working permutation and try not lose performance.
A recursive function can implement additional rules above what
productis producing. Realize that 16 characters with a repeat of 8 has ~4 billion results without a rep limit. The following function works but the example is limited for time:Output: