import random
# 生成随机验证码
# 数字验证码
check_code = ''
for i in range(4):
current = random.randint(1, 9)
check_code += str(current)
print(check_code)
# 随机字母+数字验证码
check_code = ''
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)
check_code += str(tmp)
print(check_code)