Count occurrences of a substring in a string.

In this program, we will take a string and substring as input and count occurrences of a substring in a string.

Steps to solve the program
  1. Take a string and substring as input.
  2. Count the occurrences of a substring in a string using count().
  3. Print the output.

Output :

reverse a string if it’s length is a multiple of 4.

test whether a passed letter is a vowel or consonant.

Leave a Comment