i=input("请输入密码:\n")if ord(i)>=57 or ord(i)<=48:print('支付数字不合法,请重新输入!')else:print('支付数字合法!')
你一定要用这种比较方法的话,你应该用一个for循环遍历输入的字符串,逐个判断才对