Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python - How To Count Occurrences of a Character in a String

print('Mary had a little lamb'.count('a'))
Source by www.thecodeteacher.com #
 
PREVIOUS NEXT
Tagged: #Python #How #To #Count #Occurrences #Character #String
ADD COMMENT
Topic
Name
3+4 =