How could I generate all the 2 character combinations containing a-z characters and numbers.
I believe there are 36^2 possibilities.
Thank you
import string
alphanum = string.ascii_lowercase + string.digits
combination = []
for val1 in alphanum:
for val2 in alphanum:
combination.append(val1+val2)
print(combination)
Try
import string
alphanum = string.ascii_lowercase + string.digits
combs = [val1+val2 for val1 in alphanum for val2 in alphanum]
This should give a list of all possible 36^2 two character strings using all letters and numbers.
Edit: modified to use string.digits