input: from typing import List
  
  def remove_duplicates(string: str) -> str:
      """ Remove all consecutive duplicates from the string and return the result.
      >>> remove_duplicates("AAABBCCCD")
      "ABCD"
      >>> remove_duplicates("A")
      "A"
      """
      result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result
output:     result = "" 
      prev = '' 
  
      for char in string:
          if char != prev: 
              result += char
              prev = char
      return result