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())
pyton3 随机生成 数字和字母的验证码
猜你喜欢
转载自blog.csdn.net/w739639550/article/details/76034467
今日推荐
周排行