Remove Duplicate Characters from Text in Python

Remove Duplicate Characters from Text in Python

Remove duplicate characters from it and make a line of text unique.

Remove duplicate characters from text

text = input(“Enter a line of text: “)

result = “”

for ch in text:
if ch not in result:
result = result + ch

print(“Unique text:”, result)