python 统计字符串中指定字符出现次数的方法:
strs = "They look good and stick good!" count_set = ['look','good'] res=strs.count('good') print(res)
python 统计字符串中指定字符出现次数的方法:
strs = "They look good and stick good!" count_set = ['look','good'] res=strs.count('good') print(res)
转载于:https://www.cnblogs.com/shenxiaolin/p/11065592.html