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'))




Picture showing the output of count string function in python



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

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250