Python simple solution
Python :\n\n\ndef removeDuplicates(self, s: str) -> str:\n\ti = 0\n\n\twhile i < len(s) - 1:\n\t\tif i >= 0 and s[i] == s[i + 1]:\n\t\t\ts = s[:i] + s[i + 2:]\n
**Python :**\n\n```\ndef removeDuplicates(self, s: str) -> str:\n\ti = 0\n\n\twhile i < len(s) - 1:\n\t\tif i >= 0 and s[i] == s[i + 1]:\n\t\t\ts = s[:i] + s[i + 2:]\n\t\t\ti -= 1\n\n\t\telse:\n\t\t\ti += 1\n\n\treturn s\n```\n\n**Like it ? please upvote !**
['Python', 'Python3']