View Code
1 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())
赞
踩
View Code
1 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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。