demo_ref_string_count2.py:
txt = "I love apples, apple are my favorite fruit" x = txt.count("apple", 10, 24) print(x)
C:\Users\My Name>python demo_string_count2.py
1