标签:color and += span random range port turn class
1 def v_code(): 2 code_str = ‘‘ 3 for i in range(5): 4 import random 5 num = random.randint(0,9) 6 str1 = chr(random.randint(65,90)) 7 str2 = chr(random.randint(97,122)) 8 code_str +=str(random.choice([num,str1,str2])) 9 return code_str 10 print(v_code()) 11 输出: 12 0WT2Y
标签:color and += span random range port turn class
原文地址:https://www.cnblogs.com/ch2020/p/12395226.html