python 实现

计算某字母出现次数

http://www.nowcoder.com/questionTerminal/a35ce98431874e3a820dbe4b2d0508b1

from collections import Counter
while True:
    try:
        str_ = input().lower()
        char = input().lower()
        print(Counter(str_)[char])
    except:
        break
全部评论

相关推荐

点赞 评论 收藏
分享
评论
6
2
分享

创作者周榜

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