How to Count how Many Times a Substring is in a String in Python - Python Substring Tutorial

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Thanks for the logic in main string slicing part

saichandm
Автор

do you know how to count the number of occurrences of a sub string that appears after a specific selection of text in a string?

for example:

string = 'abcdcedabccg'
sub-string = 'ab'

how many times does 'c' appear after 'ab' in the text?

yessirski
join shbcf.ru