input: Write a function to build a dictionary from a list of string samples where each sample is in the format "key->value". The function should return the dictionary with keys and values corresponding to those in the samples.
  
  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"]
  assert build_dictionary(samples) == {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
  assert build_dictionary(["grape->purple", "lemon->yellow"]) == {'grape': 'purple', 'lemon': 'yellow'}
  assert build_dictionary([]) == {}
  assert build_dictionary(["mango->orange"]) == {'mango': 'orange'}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary