标签:ret dom pytho pre 验证码 code rand 实现 str
def v_code():
ret = ‘‘
for i in range(5):
num = random.randint(0,9)
alf = chr(random.randint(65,122))
s = str(random.choice([num,alf]))
ret += s
return ret
print(v_code())
标签:ret dom pytho pre 验证码 code rand 实现 str
原文地址:https://www.cnblogs.com/geeker-xjl/p/8809915.html