WeCodeAcademy
❮ str.endswith()str.format() ❯

str.count()

Counts occurrences.

Group: String

Syntax

s.count(text)

Example

Examplepython
Open in editor »

← All of Python Reference