input: Write a function to remove consecutive duplicate characters from a string.
  assert remove_duplicates("aabbccdd") == "abcd"
  assert remove_duplicates("aaabbbcccaaa") == "abca"
  assert remove_duplicates("abcde") == "abcde"
output: def remove_duplicates(s):
      if not s:
          return ""
      result = [s[0]]
      for char in s[1:]:
          if char != result[-1]:
              result.append(char)
      return ''.join(result)