Remove unwanted characters from the given string

In this program, we will take a string as input and remove unwanted characters from the given string.

Steps to solve the program
  1. Take a string as input.
  2. Remove the unwanted characters using isalnum() and for loop.
  3. Print the output.

Output :

remove duplicate words from the string.

find the longest capital letter word from the string.

Leave a Comment