input: Write a python function to remove consecutive duplicates from a string.
  assert rm_duplicates('aabccdaacbg') == 'abcdacbg'
  assert rm_duplicates('aaaa') == 'a'
  assert rm_duplicates('abc') == 'abc'
output: def rm_duplicates(s):
      if not s:
          return ""
      
      result = [s[0]]
      for char in s[1:]:
          if char != result[-1]:
              result.append(char)
              
      return ''.join(result)