Sorry to bother you with my stupidity... I can't find how itertools.permutations work, the output is strange ! It is supposed to return all the possible combinations, like a bruteforce with a length defined for the output (a, b, c, ..., aa, ab, ac..., aaa, aab, aac... is a bruteforce, and permutations with 3 for exemple as length : aaa, aab, aac... dee, def, deg, ... zaa, zab, zac...), isn't it ?
But if I use "0123456789", sometimes values are missing, like 040613, and a lot are missing even if globally I got a loooot of values. So how does it work ?
If you want specifications, I try to get all possible dates at the format 050520 for exemple (may the second, 2020). But if dates are missing...
My code :
from itertools import permutations #or combinations
def dates(charset, maxlength):
return (''.join(candidate) for candidate in permutations(charset, maxlength))
print(list(dates("0123456789", 6)))
Thanks to all who will try to help me, have a nice day !