What's the simplest way to count the number of occurrences of a character in a string?
e.g. count the number of times that 'a'
appears in 'Mary had a little lamb'
.
countpythonstring
What's the simplest way to count the number of occurrences of a character in a string?
e.g. count the number of times that 'a'
appears in 'Mary had a little lamb'
.
Best Answer