import randomcheckcode=''for i in range(4): current=random.randrange(0,4) if current==i: tmp=chr(random.randint(65,90)) else: tmp=random.randint(0,9) checkcode+=str(tmp)print(checkcode)
本文共 262 字,大约阅读时间需要 1 分钟。
import randomcheckcode=''for i in range(4): current=random.randrange(0,4) if current==i: tmp=chr(random.randint(65,90)) else: tmp=random.randint(0,9) checkcode+=str(tmp)print(checkcode)
转载于:https://www.cnblogs.com/zechome/p/8576689.html