python之生成随机密码
https://www.cnblogs.com/evablogs/p/7096583.html
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/python#-*-conding:utf-8-*-#密码随机生成器,密码长度由用户输入,用户可以自己设置密码长度importrandomimportstringdefgetRandompwd(pwd_length):    password =''    fori inrange(pwd_length):        password =str(password +str(random.randrange(0,10)))    print(password)        pwd_length =int(input("please input the password length:"))getRandompwd(pwd_length) | 
运行:
| 1 2 | please inputthe password length:6077558 | 
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号