Question

In Python, how to count the number of occurrences of a character in a String?


Annonce
Ad

Answer

Example with letter 'c':
string.count('c')


[source]
# ID Query