python随机验证码
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
浙公网安备 33010602011771号