count()
Counts how many times a piece occurs.
Syntax
text.count(part)
Description
Returns the number of times the given piece repeats in the text (or list).
Returns
The repeat count (int).
Example
Loading editor…
Expected output
4
When to use?
Measuring the frequency of a letter/word, simple text analysis.