1 def check_code(): #随机生成验证码
2 import random
3 checkcode = ''
4 for i in range(4):
5 current = random.randrange(0, 4)
6 if current != i:
7 temp = chr(random.randint(65, 90))
8 else: 9 temp = random.randint(0, 9) 10 checkcode += str(temp) 11 return checkcode
随机生成验证码
猜你喜欢
转载自www.cnblogs.com/jeavy/p/9129973.html
今日推荐
周排行