会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
余鑫2021
博客园
首页
新随笔
联系
订阅
管理
2021年11月18日
python使用random模块随机产生验证码
摘要: 1 def rand_code(n=6, alph=True): 2 code = '' 3 for i in range(n): 4 num = str(random.randint(0, 9)) # 随机产生一个随机整数 5 if alph: 6 alph_upper = chr(random.
阅读全文
posted @ 2021-11-18 18:19 余鑫2020
阅读(85)
评论(0)
推荐(0)
公告