📌  相关文章
📜  python 计算一个字符在字符串中出现的次数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:46.709000             🧑  作者: Mango

代码示例2
str = "Hello world".lower()

result = str.count('world')
print(result)
#the ouput will be 1 because in the variable "str" the letter "world" appers only one time :)