标签:temp import 输入验证码 for 验证码 python str current range
import random
while True:
code = ‘‘
for i in range(4):
current = random.randrange(0,4)
if current == i:
temp = chr(random.randint(65,90))
else:
temp = str(random.randint(0,9))
code+=temp
print(code)
input_user = input("请输入验证码:")
if input_user == code:
print("。。。。。。。。。欢迎。。。。。。。")
break
else:
print("您输入的验证码不正确。")
标签:temp import 输入验证码 for 验证码 python str current range
原文地址:http://www.cnblogs.com/jcplee/p/7712606.html