input: Write a python function to sort a list of strings by their lengths in descending order.
  assert sort_by_length(['apple', 'banana', 'cherry', 'date']) == ['banana', 'cherry', 'apple', 'date']
  assert sort_by_length(['cat', 'elephant', 'dog', 'mouse']) == ['elephant', 'mouse', 'cat', 'dog']
  assert sort_by_length(['abc', 'a', 'ab', 'abcd']) == ['abcd', 'abc', 'ab', 'a']
output: def sort_by_length(strings):
      return sorted(strings, key=len, reverse=True)