In this program, we will take a string as input and find duplicate characters in a string
Steps to solve the program
- Take a string as input and create an empty list.
- Use for loop to iterate over every character of the string.
- Count the occurrences of each character in the string using count().
- If count > 1 then add that character to the empty list.
- Convert that list to a set.
- Print output
Output :