Python 生成验证码

时间:2017-09-16 15:52:54   收藏:0   阅读:196
temp2 = ""
for i in range(6):
    num = random.randrange(0,6)
    if num == 1 or num == 3 or num ==5:
        temp2 = temp2 + str(num)
    else:
        num2 =random.randrange(65,91)
        temp2 +=chr(num2)
print(temp2)

 

原文:http://www.cnblogs.com/youmingkuang/p/7531222.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!