Python的随机数

import  random

checkcode = ''

for i in range(0,6):
currentcode = random.randrange(0,5)
if currentcode == i:
temp = chr(random.randint(65,90))
else:
temp = random.randint(0,9)
checkcode+=str(temp)
print(checkcode)
posted @ 2019-03-06 22:21  xiaofeiAI  阅读(67)  评论(0)    收藏  举报