验证码

import random
identifying_code=''
for i in range(0,4):
current=random.randrange(0,3)
if current==i:
tmp=chr(random.randint(65,90))
else:
tmp=random.randint(0,9)
identifying_code+=str(tmp)
print(identifying_code)
posted @ 2018-08-27 16:41  心几绝而不凡  Views(147)  Comments(0)    收藏  举报