Function
string.count

Signature

count(s, *args)

Documentation String

count(s, sub[, start[,end]]) -> int

Return the number of occurrences of substring sub in string s[start:end]. Optional arguments start and end are interpreted as in slice notation.