码迷,mamicode.com
首页 > 其他好文 > 详细

简单的验证码程序

时间:2018-01-09 14:47:13      阅读:90      评论:0      收藏:0      [点我收藏+]

标签:bsp   验证   nbsp   数字   coding   tmp   random   utf-8   imp   

#!/usr/bin/env python #-*-coding=utf-8 -*- #AUTHOR:duwentao import random chechkcode = '' for i in range(4):     current = random.randrange(0,4)          #字母     if current == i:         tmp = chr(random.randint(65,90))     #数字     else:         tmp = random.randint(0,9)     chechkcode += str(tmp) print(chechkcode)


简单的验证码程序

标签:bsp   验证   nbsp   数字   coding   tmp   random   utf-8   imp   

原文地址:http://blog.51cto.com/tdcqvip/2058999

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!