input: Write a function to build a dictionary from a list of string pairs separated by "->". Each string pair consists of a key and a corresponding value. 
  
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"])=={"apple": "red", "banana": "yellow", "cherry": "red"}
  assert build_dictionary(["dog->brown", "cat->white"])=={"dog": "brown", "cat": "white"}
  assert build_dictionary([])=={}
output: def build_dictionary(pairs):
      result = {}
      for pair in pairs:
          key, value = pair.split('->')
          result[key] = value
      return result