input: Write a python function to convert a list of strings into a dictionary with the strings as keys and their lengths as values.
  assert string_to_dict(["apple", "banana", "cherry"]) == {"apple": 5, "banana": 6, "cherry": 6}
  assert string_to_dict(["hello", "world"]) == {"hello": 5, "world": 5}
  assert string_to_dict(["a", "ab", "abc"]) == {"a": 1, "ab": 2, "abc": 3}
output: def string_to_dict(strings):
      return {string: len(string) for string in strings}