def v_code():
ret = “”
for i in range(5):
num = random.randint(0,9)
alf = chr(random.randint(65,122))
num_alf = str(random.choice([num,alf]))
ret +=num_alf
return ret
print (v_code())
python随机验证码生成
最新推荐文章于 2024-04-18 09:32:45 发布
def v_code():
ret = “”
for i in range(5):
num = random.randint(0,9)
alf = chr(random.randint(65,122))
num_alf = str(random.choice([num,alf]))
ret +=num_alf
return ret
print (v_code())