题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
strlist = list(input()) # 将字符串输入转换成,字符列表 print(len(set(strlist))) # 然后通过字符列表创建集合,集合的元素个数就是不同字符的个数
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
strlist = list(input()) # 将字符串输入转换成,字符列表 print(len(set(strlist))) # 然后通过字符列表创建集合,集合的元素个数就是不同字符的个数
相关推荐