input: Write a function to remove all consecutive duplicates from a given string. The function should return the modified string with no consecutive duplicate characters.
  def remove_duplicates(string): 
      result = "" 
      prev = '' 
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result
  
  assert remove_duplicates("AAABBCCCD")=="ABCD"
  assert remove_duplicates("aabccbaa")=="abcba"
  assert remove_duplicates("abcdef")=="abcdef"
  assert remove_duplicates("aabbcc")=="abc"
  assert remove_duplicates("")==""
output: def remove_duplicates(string): 
      result = "" 
      prev = '' 
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result