input: Write a function to create a dictionary from a list of strings where each string contains a key and a value separated by an arrow ('->'). If the input list is empty, return an empty dictionary.
  
  def build_dictionary(samples):
   dictionary={}
   for sample in samples:
    key,value = sample.split('->')
    dictionary[key] = value
   return dictionary
  
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"]) == {"apple": "red", "banana": "yellow", "cherry": "red"}
  assert build_dictionary([]) == {}
  assert build_dictionary(["dog->brown"]) == {"dog": "brown"}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split('->')
          dictionary[key] = value
      return dictionary