VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > Python基础教程 >
  • Python随机生成验证码的两种方法(2)

测试:

1
2
3
4
code = generate_verification_code(6)
code2 = generate_verification_code_v2()
print code
print code2

输出结果:

1
2
Glc5Tr
Hr6t7B

我个人更倾向于第一种方法,更加灵活,可以随意设置验证码长度。


相关教程