随机生成一个验证码
#生成一个随机数
#数字转换成字母 chr(数字)
#ascii(65-90为大写字母)
import random
temp = ""
for i in range(6):
num = random.randrange(1, 3)
if num == 1 or num == 3 :
rad2 = random.randrange(1,9)
temp = temp + str(rad2)
else:
rad1 = random.randrange(65, 91)
c1 = chr(rad1)
temp += c1
print(temp)