# if order of characters is important
string=input('enter string:')
new=''
for i in string:
if i not in new:
new+=i
print(new)
# if order of characters is not important
s=set()
for i in string:
s.add(i)
lis=''
for i in s:
lis+=i
print(lis)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter