input: 
  from typing import List
  
  
  def replace_word(sentence: str, old_word: str, new_word: str) -> str:
      """ Replace a given old word in a sentence with a new word.
      >>> replace_word("I love walking on the beach", "walking", "swimming")
      'I love swimming on the beach'
      >>> replace_word("Python is awesome", "awesome", "great")
      'Python is great'
      """
  
output:     words = sentence.split()
      for i in range(len(words)):
          if words[i] == old_word:
              words[i] = new_word
      return ' '.join(words)