How can I remove duplicate characters from a string using Python? For example, let\'s say I have a string:
foo = \"SSYYNNOOPPSSIISS\"
How c
def removeDuplicate(s): if (len(s)) < 2: return s result = [] for i in s: if i not in result: result.append(i) return ''.join(result)