I want to be able to generate 12 character long chain, of hexadecimal, BUT with no more than 2 identical numbers duplicate in the chain: 00 and not 000 Because, I know how to generate ALL possibilites, including 00000000000 to FFFFFFFFFFF, but I know that I won't use all those values, and because the size of the file generated with ALL possibilities is many GB long, I want to reduce the size by avoiding the not useful generated chains.
So my goal is to have results like 00A300BF8911 and not like 000300BF8911
Could you please help me to do so? Many thanks in advance!
if you picked the same one twice, remove it from the choices for a round:
Since the title mentions generators. Here's the above as a generator:
Results:
You could also change the while true loop to only produce a certain number of these based on a number passed into the function.