input: Write a python function to compute the lengths of strings in a list.
  assert string_lengths(['hello', 'world']) == [5, 5]
  assert string_lengths(['python', 'code']) == [6, 4]
  assert string_lengths(['a', 'ab', 'abc']) == [1, 2, 3]
output: def string_lengths(lst):
      return [len(s) for s in lst]