RosettaCodeData/Task/Count-occurrences-of-a-substring/Python/count-occurrences-of-a-substring.py
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

4 lines
70 B
Python

>>> "the three truths".count("th")
3
>>> "ababababab".count("abab")
2