重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

python获取八位随机密码

password = ''
for i in range(8):
        current = random.randrange(0,8)
        if current > i:
                temp = random.randint(0,9)
        elif current < i:
                temp = chr(random.randint(65,90))
        else:
                temp = chr(random.randint(97,122))
        password += str(temp)
print password

本文标题:python获取八位随机密码
URL分享:http://cqcxhl.cn/article/ijicip.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP