随机验证码

def v_code():
ret=""
for i in range(5):
num=random.randint(0,9)
alf=chr(random.randint(65,122))
s=str(random.choice([num,alf]))
ret+=s
return ret
print(v_code())
原文地址:https://www.cnblogs.com/jiawen010/p/9830030.html