input: Write a function to replace every occurrence of a given word in a string with another specified word. If the specified word does not exist in the string, return the original string.
  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("Python is fun to learn", "fun", "exciting")=="Python is exciting to learn"
  assert replace_word("Hello world", "earth", "world")=="Hello world"
output: def replace_word(sentence, old_word, new_word):
      return sentence.replace(old_word, new_word)