input: Write a python function to parse a string and return the substrings which are enclosed in the given pattern.
  assert parse_string(":", "This is a:test:string.")==["test"]
  assert parse_string("*", "Here is *one* example *string* for you.")==["one", "string"]
  assert parse_string("#", "#Start# and #End# are marked.")==["Start", "End"]
output: def parse_string(pattern, string):
      substrings = []
      start = 0
      while True:
          start = string.find(pattern, start)
          if start == -1:
              break
          end = string.find(pattern, start + 1)
          if end == -1:
              break
          substrings.append(string[start + 1:end])
          start = end + 1
      return substrings