如何添加额外字符?Python3.X

如何添加额外字符?Python3.X,python,python-3.x,Python,Python 3.x,所以我试着做一个蛮力类型的程序是有原因的。。 到目前为止,我已经做到了。。但只有一个字符,我真的不确定如何增加它从检查a到aa,ab,ba等。 这是我到目前为止的代码 target = input("What is the target word for you to get?\n") chars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "

所以我试着做一个蛮力类型的程序是有原因的。。 到目前为止,我已经做到了。。但只有一个字符,我真的不确定如何增加它从检查a到aa,ab,ba等。 这是我到目前为止的代码

target = input("What is the target word for you to get?\n")

chars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "3", "4", "5", "6", "7", "8", "9"]

for attempt in chars :
    if(attempt == target):
        break
    else :
        print(attempt)   

print("Success! \""+ attempt + "\" was the correct password correct!")
更新

我的输出要求是target=password 而不是只循环直到它到达9或chars数组的末尾
继续,当它达到9时,它将执行aa-a9,然后再次启动ba到b9等等

你能显示一个示例输入和期望输出吗?现在更新它的可能副本@KasraAD@spirulence我没有看到-_u-@Ashmoreinc2仍然不清楚,密码的最终输出是什么?