input: from typing import List
  
  def remove_duplicates(string: str) -> str:
      """ Remove consecutive duplicates from the given string.
      >>> remove_duplicates("AAABBCCCD")
      'ABCD'
      >>> remove_duplicates("aabbccdd")
      'abcd'
      """
      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