input: Write a python function to extract a substring from a given string using start and end indices.
  assert substring("hello world", 0, 5) == "hello"
  assert substring("python programming", 7, 18) == "programming"
  assert substring("data science", 5, 12) == "science"
output: def substring(s, start, end):
      return s[start:end]