首页 > 编程语言 > 详细

Python之简单验证码实现

时间:2018-04-12 19:46:48      阅读:149      评论:0      收藏:0      [点我收藏+]
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())

Python之简单验证码实现

原文:https://www.cnblogs.com/geeker-xjl/p/8809915.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!