What would be the best way to return specific letters but at the same time those random letters, for example from the distance a to f [a,b,c,d,e,f]. I know how to do it with the whole alphabet using the random
and function string.ascii_letters
, but I don't understand how to make it specific.
def gen():
return random.choice(string.ascii_letters + string.digits)
# prints the first digits until %s, and starts printing random generation.
def printme():
combo1 = '999999991468%s111%s1%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s' % (
gen().upper(), gen().upper(), gen().upper(),
gen().upper(), gen().upper(), gen().upper(),
gen().upper(), gen().upper(), gen().upper(),
gen().upper(), gen().upper(), gen().upper(),
gen().upper(), gen().upper(), gen().upper(),
gen().upper(), gen().upper()
)
You can do it exactly the same but using the subset you want. For example: