26个大小写字母和9个数字中随机生成8位密码
完整代码:
from random import *
s="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM123456789"
l=''
for i in range(8):
l+=choice(s)
print(l)
运行结果:
>>>
==== RESTART: C:\Users\LENOVO\Desktop\practice.py ====
IfUrwiky
>>>
==== RESTART: C:\Users\LENOVO\Desktop\practice.py ====
SWm2J4ak
>>>
==== RESTART: C:\Users\LENOVO\Desktop\practice.py ====
7jFGfwYB
>>>