input: Write a function to sort the given list of words in alphabetical order. If the given list is empty, return the empty list. If the given list is already sorted, return the list as is.
  def sort_words(words):
      if not words:
          return words
      sorted_words = sorted(words)
      return sorted_words if sorted_words != words else words
  assert sort_words(['bubble', 'selection', 'quicksort', 'insertion'])==['bubble', 'insertion', 'quicksort', 'selection']
  assert sort_words(['apple', 'banana', 'cherry'])==['apple', 'banana', 'cherry']
  assert sort_words([])==[]
  assert sort_words(['z', 'y', 'x'])==['x', 'y', 'z']
output: def sort_words(words):
      if not words:
          return words
      sorted_words = sorted(words)
      return sorted_words if sorted_words != words else words