import random
checkcode=''
for i in range(0,5):#5位驗證碼current=random.randrange(0,5)#字母if current==i:tmp=chr(random.randint(65,115))#數組else:tmp=random.randint(0,9)checkcode+=str(tmp)
print(checkcode)
?
import random
checkcode=''
for i in range(0,5):#5位驗證碼current=random.randrange(0,5)#字母if current==i:tmp=chr(random.randint(65,115))#數組else:tmp=random.randint(0,9)checkcode+=str(tmp)
print(checkcode)
?
轉載于:https://www.cnblogs.com/tianqizhi/p/8432873.html
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态