def create_code():
while True:
code = random.randint(0x30, 0x5A)
if code >= 0x30 and code <=0x39 or code >= 0x41 and code <=0x5A:#数字字母的区段
return chr(code)
def security_code():#验证码
return (create_code()+create_code()+create_code()+create_code())