input: 
  def replace_word(sentence: str, old_word: str, new_word: str) -> str:
      """ Replace a given word in a sentence with another word and return the new sentence.
      >>> replace_word("I love walking on the beach", "walking", "swimming")
      'I love swimming on the beach'
      """
      return sentence.replace(old_word, new_word)
  
  # Example usage:
  sentence = "I love walking on the beach"
  old_word = "walking"
  new_word = "swimming"
  new_sentence = replace_word(sentence, old_word, new_word)
  print("The new sentence is: '{}'".format(new_sentence))
  
output:     
      return sentence.replace(old_word, new_word)
  