input: Write a function to convert a list of strings to a dictionary where the keys are the characters of the strings and the values are the lengths of the strings. If a character appears in multiple strings, the value should be the length of the last string in which it appears. The function should return the dictionary. If the input list is empty, the function should return an empty dictionary.
  
  def convert_to_dict(strings):
   dictionary = {}
   for string in strings:
    for char in string:
     dictionary[char] = len(string)
   return dictionary
  
  assert convert_to_dict(['hello', 'world', 'computer'])=={'h': 5, 'e': 5, 'l': 5, 'o': 5, 'w': 5, 'r': 5, 'd': 5, 'c': 8, 'm': 8, 'u': 8, 't': 8, 'p': 8, 'e': 8, 'r': 8}
  assert convert_to_dict([''])=={}
  assert convert_to_dict([])=={}
  assert convert_to_dict(['a', 'bb', 'ccc'])=={'a': 1, 'b': 2, 'c': 3}
  assert convert_to_dict(['ab', 'abc', 'abcd'])=={'a': 4, 'b': 4, 'c': 4, 'd': 4}
output: def convert_to_dict(strings):
      dictionary = {}
      for string in strings:
          for char in string:
              dictionary[char] = len(string)
      return dictionary