验证码的校验

n=input()
m=list(str(n))
if (m[0]=='Q' or m[0]=='q'):
if (m[1]=='s' or m[1]=='S'):
if (m[2]=='2'):
if (m[3]=='X' or m[3]=='x'):
print('验证码正确')
else:
print('验证码错误,请重新输入')
else:
print('验证码错误,请重新输入')
else:
print('验证码错误,请重新输入')
else:
print('验证码错误,请重新输入')

原文地址:https://www.cnblogs.com/2640335699qqcom/p/12655900.html