Im trying to use python to define a character set then generate all the possible strings that are the in character set.
I was thinking of first setting the character set as a variable then using for loops to generate the possible strings like this:
charSet = [a-zA-Z0-9]
for a in charSet:
print (a)
for b in charSet:
print (b)
But i keep getting this error message
UnboundLocalError: local variable ‘a’ referenced before assignment
Any ideas anyone?
Once you get your charSet definition problem resolved, look at itertools.product: