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

 

相关文章:

  • 2021-11-08
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-09-02
  • 2022-12-23
  • 2021-07-12
相关资源
相似解决方案