parameters: (self, S)
return_statement: return "".join(result)
docstring: :type S: str
          :rtype: str
docstring_summary: :type S: str
          :rtype: str
docstring_tokens: : type S : str : rtype : str
function: def removeDuplicates(self, S):
          """
          :type S: str
          :rtype: str
          """
          result = []
          for c in S:
              if result and result[-1] == c:
                  result.pop()
              else:
                  result.append(c)
          return "".join(result)
function_tokens: def removeDuplicates ( self , S ) : result = [ ] for c in S : if result and result [ - 1 ] == c : result . pop ( ) else : result . append ( c ) return "" . join ( result )