7
6
2009
1

python 生成随机密码

类似 Django 里面的 make_random_password 

def makepassword(rang = "23456789qwertyupasdfghjkzxcvbnm", size = 8):
    return string.join(random.sample(rang, size)).replace(" ","")

 默认是生成由“23456789qwertyupasdfghjkzxcvbnm” 组成的 8位数密码

避免了 l 1, 0 o 混淆不清的麻烦。

 

Category: Python | Tags: python | Read Count: 3451
bandar bola online t 说:
2019年4月03日 20:14

Thanks for sharing this useful information here


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com