input: Write a function to replace a given word in a sentence with another word and return the new sentence.
  def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)
  
  assert replace_word("I love walking on the beach", "walking", "swimming")=="I love swimming on the beach"
  assert replace_word("The quick brown fox jumps over the lazy dog.", "lazy", "energetic")=="The quick brown fox jumps over the energetic dog."
  assert replace_word("Hello, world!", "world", "Python")=="Hello, Python!"
  assert replace_word("", "anything", "nothing")==""
  assert replace_word("This is a test", "notpresent", "new")=="This is a test"
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)