input: Write a function to reverse the order of words in a given string. The function should return the string with the words in reverse order. If the given string is empty, it should return an empty string.
  
  def reverse_words(str):
      return " ".join(str.split()[::-1])
  
  assert reverse_words("the sky is blue") == "blue is sky the"
  assert reverse_words("  hello world  ") == "world hello"
  assert reverse_words("a good   example") == "example good a"
  assert reverse_words("    ") == ""
  assert reverse_words("") == ""
output: def reverse_words(str):
      return " ".join(str.split()[::-1])