您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

使用python随机生成6位密码实例代码

2024/7/19 1:39:07发布26次查看
这篇文章详解使用python随机生成6位密码实例代码
#!/usr/bin/env python # -*- coding: utf-8 -*- import random #生成随机6位随机数含字母 code = [] for i in range(6): if i == random.randint(1,5): code.append(str(random.randint(1,5))) else: code.append(chr(random.randint(65,90))) print ''.join(code) #转换成字符串
以上就是使用python随机生成6位密码实例代码的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product