input: Write a python function to sort a list of strings by their length.
  assert sort_list(['apple', 'banana', 'cherry', 'date']) == ['date', 'apple', 'banana', 'cherry']
  assert sort_list(['a', 'aa', 'aaa', 'aaaa']) == ['a', 'aa', 'aaa', 'aaaa']
  assert sort_list(['longest', 'short', 'tiny', 'medium']) == ['tiny', 'short', 'medium', 'longest']
output: def sort_list(strings):
      return sorted(strings, key=len)