chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ'
n = 5
for xs in itertools.product (chars, repeat=n) :
with open ("test.txt", "a+") as wordlist:
wordlist.write(str(''.join(xs)) + '\n')
print(''.join(xs))
但是我无法将其拆分(xs:xs),所以不会以aaaaa:aaaaa格式打印
a b C d Ë F G H 一世 Ĵ ķ 升 米 ñ Ø p q [R s Ť ü v w X ÿ ž 然后盖帽 一种 乙 C然后继续