Reverse a string if its length is multiple of 4

In this program, we will take a string as input and reverse a string if its length is a multiple of 4

Steps to solve the program
  1. Take a list as input.
  2. If its length is divisible by 4 then reverse the string.
  3. Print the output.

Output :

string made of 4 copies of the last two characters

count occurrences of a substring in a string.

Leave a Comment