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'))
Posted By - | Karan Gupta |
|
Posted On - | Wednesday, February 20, 2019 |