标签:int class 生成 random xtend 字符 img png mic
print(ord(‘A‘)) print(ord(‘a‘)) print(ord(‘0‘)) import random SecChar = [] for i in range(26):# 将大写字母对应的unicode码添加到对应list中 SecChar.extend(chr(random.randint(65,90))) for i in range(26):# 将小写字母对应的unicode码添加到对应list中 SecChar.extend(chr(random.randint(97,122))) for i in range(9): # 将数字对应的unicode码添加到对应list中 SecChar.extend(chr(random.randint(48,58))) print(SecChar) for i in range(9): password = "" for j in range (7): s = int(random.randint(1, 60)) password += SecChar[s] print(password)
#在26个大小写字母(52个),以及9个数字组成的字符列表中,随机生成10个8位密码
标签:int class 生成 random xtend 字符 img png mic
原文地址:https://www.cnblogs.com/jzym/p/10868592.html