input: Write a python function to replace a substring within a string with another substring.
  assert replace_substring("Hello, world", "world", "Earth") == "Hello, Earth"
  assert replace_substring("Goodbye, world", "world", "Earth") == "Goodbye, Earth"
  assert replace_substring("Hello, Earth", "world", "Planet") == "Hello, Earth"
output: def replace_substring(s, old, new):
      return s.replace(old, new)