input: Write a function to build a dictionary from a list of string samples where each sample is in the format "key->value". If the given samples list is empty then 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([]) == {}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary