input: Write a function to create a dictionary from a list of string samples where each sample is in the format "key->value". The function should split each sample at the "->" delimiter and store the results in a dictionary with keys being the first part of each sample and values being the second part. 
  
  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)
  assert dictionary == {"apple": "red", "banana": "yellow", "cherry": "red"}
  print(dictionary)
  
  Output: {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
output: def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary