input: from typing import List
  
  def reverse_words(str: str) -> str:
      """ This function takes a string with words and reverses their order.
      >>> reverse_words("Hello world")
      'world Hello'
      >>> reverse_words("Python is great")
      'great is Python'
      """
output:     words = str.split()
      reversed_words = words[::-1]
      return ' '.join(reversed_words)