input: Write a function to replace a given string with another string in a sentence. The function should take three parameters: the original sentence, the word to be replaced, and the new word. It should return the updated sentence with the word replaced.
  
  assert replace_word("I love walking on the beach", "walking", "swimming")=="I love swimming on the beach"
  assert replace_word("The dog is barking", "dog", "cat")=="The cat is barking"
  assert replace_word("Hello world!", "world", "Python")=="Hello Python!"
  assert replace_word("She sells seashells by the seashore", "seashells", "seaglass")=="She sells seaglass by the seashore"
  assert replace_word("", "old_word", "new_word")==""
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)