input: Write a function to replace a given substring with another substring in a string. If the substring is not found in the string, return the original string.
  assert replace_substring("I love walking on the beach", "walking", "swimming")=="I love swimming on the beach"
  assert replace_substring("I love walking on the beach", "running", "swimming")=="I love walking on the beach"
  assert replace_substring("I love walking on the beach", "", "swimming")=="I love walking on the beach"
output: def replace_substring(s, old, new):
      if old in s:
          return s.replace(old, new)
      return s