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 is repeated in multiple strings, its value should be the length of the latest string it appears in.
  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(['apple', 'banana', 'cherry'])=={'a': 6, 'p': 6, 'l': 6, 'e': 6, 'b': 6, 'n': 6, 'c': 6, 'h': 6, 'r': 6, 'y': 6}
  assert convert_to_dict([])=={}
  assert convert_to_dict(['a', 'aa', 'aaa'])=={'a': 3}
  assert convert_to_dict(['python', 'java', 'c'])=={'p': 6, 'y': 6, 't': 6, 'h': 6, 'o': 6, 'n': 6, 'j': 4, 'a': 4, 'v': 4, 'c': 1}
output: def convert_to_dict(strings):
      result = {}
      for s in strings:
          for char in s:
              result[char] = len(s)
      return result