I can't seem to find a working answer on the following:
Lets say I have the following returned LONG int (or any string for that matter):
longnr = 26731623516244147357200698985770699644500911065919594945175038371437093557337774208653
I can easily split this the following way:
splitnr = [26731,62351,624,41,4735,720,0698,9857,7069,964,450,091,10659,195,94,94517,5038,3714,3709,35,573,37,7,74208653]
Every combination is unique and thus no repeating numbers. I do this in simple code by just iterating over each item and add them to a string until it would find a repeating number. Then just write this string in a list, empty string, add the number just checked and continue until done for all.
What I want is that it will take the least combinations as possible. So first try and find all 10digit unique combinations, then 9 for the remaining, ,8,7 etc
Do I need regex? I can't make this work and some suggested I would need huge patterns.
Next option:
len(set(str(longnr)[0:10])) == len(str(longnr)[0:10])
This works for the first 10 to check if it's unique.
How do I go from here in an optimal way?
The order must be kept like in splitnr.