input: Write a python function to convert a list of strings to a list of their lengths.
  assert string_to_length(['apple', 'banana', 'cherry']) == [5, 6, 6]
  assert string_to_length(['hello', 'world']) == [5, 5]
  assert string_to_length(['python', 'is', 'fun']) == [6, 2, 3]
output: def string_to_length(strings):
      return [len(s) for s in strings]