parameters: (self, s, k)
return_statement: return "".join(c*k for c, k in stk)
docstring: :type s: str
          :type k: int
          :rtype: str
docstring_summary: :type s: str
          :type k: int
          :rtype: str
docstring_tokens: : type s : str : type k : int : rtype : str
function: def removeDuplicates(self, s, k):
          """
          :type s: str
          :type k: int
          :rtype: str
          """
          stk = [['^', 0]]
          for c in s:
              if stk[-1][0] == c:
                  stk[-1][1] += 1
                  if stk[-1][1] == k:
                      stk.pop()
              else:
                  stk.append([c, 1])
          return "".join(c*k for c, k in stk)
function_tokens: def removeDuplicates ( self , s , k ) : stk = [ [ '^' , 0 ] ] for c in s : if stk [ - 1 ] [ 0 ] == c : stk [ - 1 ] [ 1 ] += 1 if stk [ - 1 ] [ 1 ] == k : stk . pop ( ) else : stk . append ( [ c , 1 ] ) return "" . join ( c * k for c , k in stk )