code: def balancedSlicer(text, openDelim='[', closeDelim=']'):
      
      openbr = 0
      cur = 0
      for char in text:
          cur +=1
          if char == openDelim:
              openbr += 1
          if char == closeDelim:
              openbr -= 1
          if openbr == 0:
              break
      return text[:cur], cur
docs: Assuming that text contains a properly balanced expression using
      :param openDelim: as opening delimiters and
      :param closeDelim: as closing delimiters.
      :return: text between the delimiters