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 the same character appears in multiple strings, the value should be updated to the length of the last 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(['python', 'java', 'ruby'])=={'p': 6, 'y': 6, 't': 6, 'h': 6, 'o': 6, 'n': 6, 'j': 4, 'a': 4, 'v': 4, 'r': 4, 'u': 4, 'b': 4}
  assert convert_to_dict([])=={}
  assert convert_to_dict(['single'])=={'s': 6, 'i': 6, 'n': 6, 'g': 6, 'l': 6, 'e': 6}
output: def convert_to_dict(strings):
      result = {}
      for s in strings:
          length = len(s)
          for char in s:
              result[char] = length
      return result