input: 
  def replace_string(sentence: str, old_word: str, new_word: str) -> str:
      """ Replaces a given word in a sentence with another word.
      >>> replace_string("I love walking on the beach", "walking", "swimming")
      'I love swimming on the beach'
      >>> replace_string("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)