Program to swap cases of a given string

In this program, we will take a string as input and swap cases of a given string.

Steps to solve the program
  1. Take a string as input.
  2. Swap the cases of the characters using swapcase().
  3. Print the output.

Output :

find the first repeated character in a string and its index.

remove repeated characters in a string and replace it with a single letter

Leave a Comment