Answers for "python count character"

10

count characters in string python

>>> sentence = 'Mary had a little lamb'
>>> sentence.count('a')
4
Posted by: Guest on December-30-2020

Python Answers by Framework

Browse Popular Code Answers by Language