input: Write a function to reverse the order of words in a given string. The function should take a string as input and return a new string with the words in reversed order. If the input string is empty, the function should return an empty string.
  
  def reverse_words(str):
      return " ".join(str.split()[::-1])
  
  assert reverse_words("Hello world")=="world Hello"
  assert reverse_words("Python is great")=="great is Python"
  assert reverse_words("This is a test")=="test a is This"
  assert reverse_words("Single")=="Single"
  assert reverse_words("")==""
output: def reverse_words(str):
      return " ".join(str.split()[::-1])