python 统计字符串中指定字符出现次数的方法

python 统计字符串中指定字符出现次数的方法:
strs = "They look good and stick good!"
count_set = ['look','good']
res=strs.count('good')
print(res)

 

posted on 2019-06-21 16:57  CuriousZero  阅读(16188)  评论(0编辑  收藏  举报

导航