Advertisements
Advertisements
Question
Write the Python statement for the following task using built-in functions/method only:
To display the number of occurrences of the substring "is" in a string named message.
For example if the string message contains "This is his book" , then the output will be 3.
One Line Answer
Advertisements
Solution
The count() function counts the number of occurrences of a substring in a string.
shaalaa.com
Is there an error in this question or solution?
