In this program, we will take a string as input and remove repeated characters in a word of a string and replace it with a single letter.
Steps to solve the program
- Take a string as input.
- Remove the repeated characters in a string using set().
- Print the output.
Output :