input: Write a function to build a dictionary from a list of string samples where each string is in the format "key->value". The function should return a dictionary with keys as the part before "->" and values as the part after "->".
  
  def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary
  
  samples = ["apple->red", "banana->yellow", "cherry->red"]
  dictionary = build_dictionary(samples)
  
  print(dictionary)
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"])=={'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
  assert build_dictionary(["cat->orange", "dog->brown"])=={'cat': 'orange', 'dog': 'brown'}
  assert build_dictionary([])=={}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary