So I need to get a function that generates a list of letters that increase with a and end with zzz.
It should look like this:
a
b
c
...
aa
ab
ac
...
zzx
zzy
zzz
The code I have is the following:
for combo in product(ascii_lowercase, repeat=3):
print(''.join(combo))
However, this will only increase by 3 letters, and the result is more like
a
ab
abc
abcd
...
So, recall: A function that increments letters, and when it passes by z, it returns to aa. Thank!
UPDATE:
I have the same result as before. Here is what I am trying to connect to it:
a = hashlib.md5()
for chars in chain(ALC, product(ALC, repeat=1), product(ALC, repeat=1)):
a.update(chars.encode('utf-8'))
print(''.join(chars))
print(a.hexdigest())
My hash ends like this:
f1784031a03a8f5b11ead16ab90cc18e
but I expect:
415290769594460e2e485922904f345d
Thank!
source
share