input: 
  def remove_duplicates(string: str) -> str: 
      """ Removes all the consecutive duplicates from the given string.
      >>> remove_duplicates("AAABBCCCD")
      'ABCD'
      >>> remove_duplicates("aabbcc")
      'abc'
      """
      result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result
  
output:     result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result