ID EN
Built-in Types

count

Python 3.11

Return the number of non-overlapping occurrences of substring sub in the range [start, end]. Optional arguments start and end are interpreted as in slice notation.

Syntax

PYTHON
str.count(sub[, start[, end]])