I am trying to generate custom alpha numeric sequence. The sequence would be like this :
AA0...AA9 AB0...AB9 AC0...AC9..and so on..
In short, there are 3 places
this is a way to do just that:
from itertools import product
from string import ascii_uppercase, digits
for a, b, d in product(ascii_uppercase, ascii_uppercase, digits):
print(f'{a}{b}{d}')
string.ascii_uppercase is just 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
; string.digits is '0123456789'
and itertools.product then iterates over all combinations.
instead of digits
you could use range(10)
just as well.