how do count till a specific number in a string using python?

前端 未结 0 1615
深忆病人
深忆病人 2020-12-17 08:52

so what I want to do is that I want to count the number if a string and be able to print for example:

str = \'string\'
print(str.count(3))

an

相关标签:
回答
  • 消灭零回复
提交回复
热议问题