Advertisements
Advertisements
प्रश्न
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.
एक पंक्ति में उत्तर
उत्तर
The count() function counts the number of occurrences of a substring in a string.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?