您现在的位置是:首页 > Python 当前栏目 python产生随机字符串 Python 2023-03-02 11:22:01 时间 **python产生随机字符串** def GenerateRandomString(len, basechars = []): if (basechars == []): x = range(ord('a'), ord('z') + 1) x.extend(range(ord('A'), ord('Z') + 1)) x.extend(range(ord('0'), ord('9') + 1)) basechars = [chr(i) for i in x] ret = '' for i in range(len): ret += random.choice(basechars) return ret 本文地址: python产生随机字符串 相关文章 Python 文件 Python 模块与包 Python 元组和集合 Python 函数与变量作用域 Python 基础篇(一) Python 基础篇(二) Python 基础篇(三) Python 基础篇(四) Python 基础篇 (五) Python 异常处理 python实现微信自动聊天 Python一些类库的基本操作 Python爬虫之分布式爬虫 Python爬虫之scrapy框架学习 Python爬虫之selenium学习 Python爬虫模拟登陆和异步爬虫 Python问题合集 Python爬虫基础 Python进阶 Python基础