题解 | #字符个数统计python3#

字符个数统计

http://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50

while True:
    try:
        str = ''.join(set(input()))
        count = 0
        for i in str:
            if 0 <= ord(i) <= 127:
                count += 1
        print(count)
    except:
        break
全部评论
叫我们编写一个函数啊!
1 回复 分享
发布于 2022-06-30 17:22

相关推荐

KKorz:是这样的,还会定期默写抽查
点赞 评论 收藏
分享
评论
20
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务