去重:用集合set()函数,也可以不去重采用哈希表法
字符转ascii码:用ord()函数
while True:
try:
# 输入字符串
string = input()
# 去重
ss = set(string)
num = 0
for i in ss:
# 字符转ASCii码
asc = ord(i)
if 0 <= asc and asc <= 127 :
num += 1
print(num)
except:
break