题解 | #字符个数统计#
字符个数统计
http://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
python3
str = input()
num = 0
list = []
for i in str:
if ord(i)>=0 and ord(i)<=127 and i not in list:
list.append(i)
num += 1
print(num)
字符个数统计
http://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
str = input()
num = 0
list = []
for i in str:
if ord(i)>=0 and ord(i)<=127 and i not in list:
list.append(i)
num += 1
print(num)
相关推荐