input: Write a function to reverse the order of words in a given string. If the string is empty, return an empty string.
  
  def reverse_words(str):
      return " ".join(str.split()[::-1]) if str else ""
  
  assert reverse_words("Hello world") == "world Hello"
  assert reverse_words("Python is fun") == "fun is Python"
  assert reverse_words("Quick brown fox") == "fox brown Quick"
  assert reverse_words("") == ""
  assert reverse_words("SingleWord") == "SingleWord"
output: def reverse_words(str):
      return " ".join(str.split()[::-1]) if str else ""