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.
  assert convert_to_dict(['hello', 'world', 'computer'])=={'h': 5, 'e': 8, 'l': 5, 'o': 5, 'w': 5, 'r': 8, 'd': 5, 'c': 8, 'm': 8, 'u': 8, 't': 8, 'p': 8}
  assert convert_to_dict(['foo', 'bar', 'baz'])=={'f': 3, 'o': 3, 'b': 3, 'a': 3, 'r': 3, 'z': 3}
  assert convert_to_dict([])=={}
  assert convert_to_dict(['', 'empty', ''])=={'e': 5, 'm': 5, 'p': 5, 't': 8, 'y': 5}
output: def convert_to_dict(strings):
      result = {}
      for s in strings:
          for char in s:
              if char in result:
                  result[char] += len(s)
              else:
                  result[char] = len(s)
      return result