Articles → Python → Count string function in python

Count string function in python






Purpose





Example




str = "this is string example"

print ("number of occurrences of letter 'e' are:", str.count('e'))





Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, February 20, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250