python program to remove repeated characters in a string code example
Example 1: Python program to remove duplicate characters of a given string.
>>> foo = 'mppmt'
>>> ''.join(sorted(set(foo), key=foo.index))
'mpt'
Example 2: python remove repeated characters from string
''.join(list(dict.fromkeys(list(messagel))))