Python program to remove duplicate characters of a given string.

126

Python program to remove duplicate characters of a given string. -

>>> foo = 'mppmt'
>>> ''.join(sorted(set(foo), key=foo.index))
'mpt'

Comments

Submit
0 Comments