主页
Python
Python String count() 方法
demo_ref_string_count2
运行 ❯
×
更改方向
保存代码
更改主题
txt = "I love apples, apple are my favorite fruit" x = txt.count("apple", 10, 24) print(x)
1