input: Write a function to remove all consecutive duplicate characters from a given string. Let the function return the modified string after removing these duplicates.
  
  assert remove_duplicates("AAABBCCCD") == "ABCD"
  assert remove_duplicates("abbbcdddeee") == "abcde"
  assert remove_duplicates("abcde") == "abcde"
  assert remove_duplicates("") == ""
  assert remove_duplicates("a") == "a"
  
  def remove_duplicates(string): 
      result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result
output: def remove_duplicates(string): 
      result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result