随机验证码(5位数字与字母混合)
时间:2019-06-17 11:29:07
收藏:0
阅读:116
View Code1 import random 2 3 def v_code(): 4 5 ret=" " 6 for i in range(5): 7 num=random.randint(0,9) 8 alf=chr(random.randint(65,122)) 9 s=str(random.choice([num,alf])) 10 ret+=s 11 return ret 12 13 print(v_code())
原文:https://www.cnblogs.com/xiaoliangliu86/p/11038555.html
评论(0)