Write a program to print the not repeated string.
Input
The input contains a string S.
Output
The output contains a string, not repeated string.
string = str(input())
Set = set()
answer_string = ""
for el in string:
if (el not in Set):
answer_string += el
Set.add(el)
print(answer_string)
Comments
Leave a comment