input: Write a function to replace a given word in a string with another word. The function should take three parameters: the original sentence, the old word to be replaced, and the new word to replace with. Return the updated sentence.
  assert replace_word("I love walking on the beach", "walking", "swimming")=="I love swimming on the beach"
  assert replace_word("The sky is blue", "blue", "red")=="The sky is red"
  assert replace_word("Life is beautiful", "beautiful", "hard")=="Life is hard"
  assert replace_word("The quick brown fox", "quick", "slow")=="The slow brown fox"
  assert replace_word("", "", "test")==""
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)