input: 
  def reverse_words(input_str: str) -> str:
      """Reverses the order of words in a given string.
      >>> reverse_words("Hello world")
      'world Hello'
      >>> reverse_words("Python is fun")
      'fun is Python'
      """
      return " ".join(input_str.split()[::-1])
  
output:     words = input_str.split()
      reversed_words = words[::-1]
      return " ".join(reversed_words)