input: Write a function to replace a given old word in a sentence with a new word. The function should return the updated 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 cat is on the mat", "cat", "dog") == "The dog is on the mat"
  assert replace_word("Python is a great language", "great", "awesome") == "Python is a awesome language"
  assert replace_word("", "anything", "nothing") == ""
  assert replace_word("This is unchanged", "missing", "new") == "This is unchanged"
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)