input: 
  from typing import List
  
  
  def remove_duplicates(string): 
      result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result
  
  result = remove_duplicates("AAABBCCCD")
  print(result)
  
  """ 
  This function removes consecutive duplicate characters from a given string.
  
  Test Cases:
  >>> remove_duplicates("AAABBCCCD")
  'ABCD'
  >>> remove_duplicates("aabccdee")
  'abcde'
  """
output:     for char in string:
          if char != prev: 
              result += char
              prev = char
      return result