how to remove repeating characters in a string in python with loops code example
Example: Python program to remove duplicate characters of a given string.
>>> foo = 'mppmt'
>>> ''.join(sorted(set(foo), key=foo.index))
'mpt'
>>> foo = 'mppmt'
>>> ''.join(sorted(set(foo), key=foo.index))
'mpt'