Technically you want a selection **which allows sequence items to be repeated,
a **combination or permutation does not:

def selections(seq, n):
"""
selections(seq, n) is a recursive generator where
seq is an iterable object
n is the sample size
n = len(seq) is the max sample size
returns a list of lists of unique sample size items
"""
if n == 0:
yield []
else:
for i in range(len(seq)):
# recursion
for ss in selections(seq, n - 1):
yield [seq[i]] + ss
# use 'ABC' or ['A', 'B', 'C']
iterable = 'ABC'
sample_size = len(iterable)
sel = list(selections(iterable, sample_size))
# show as strings
for item in sel:
s = "".join(item)
print(s)
""" my result >>>
AAA
AAB
AAC
ABA
ABB
ABC
ACA
ACB
ACC
BAA
BAB
BAC
BBA
BBB
BBC
BCA
BCB
BCC
CAA
CAB
CAC
CBA
CBB
CBC
CCA
CCB
CCC
"""

First of, i didn't know where to post this question as it isn't actually programming based but yeah. sorry.. Anyway, I was going through my binary file trying to figure ...