Python统计字符个数,计算结果一直不对怎么办,麻烦大佬捞捞看看哪里错了n=input("请输入一串字符:")letter=dight=blank=others=0for i in n: if ord('a')<=ord('i')<=ord('z') or ord('A')<=ord('i')<=ord('Z'): letter=letter+1 elif ord('0')<=ord('i')<=ord('9'): dight=dight+1 elif ord('i')==ord(' '): blank=blank+1 else: others=others+1print("这串字符中字母的个数为:{},数字的个数为:{},空格的个数为:{},其他字符的个数为:{}".format(letter,dight,blank,others))