使用python产生10个随机的激活码,包含大小写字母及数字0-9,长度均为20。
所包含的字母数字表达式:
import string
selectWord = string.ascii_letters + "0123456789"
import random
import string
selectWord = string.ascii_letters + "0123456789"
def res(count, length):
# count = 10
# len = 20
for x in range(count):
re = ""
for y in range(length):
re += random.choice(selectWord)
print (re)
if __name__ == '__main__':
res(10, 20)