Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Between markers in 3 lines solution in Clear category for Between Markers by iwtdy
def between_markers(text: str, begin: str, end: str) -> str:
"""
returns substring between two given markers
"""
a = 0 if begin not in text else text.find(begin)+len(begin)
b = len(text) if end not in text else text.find(end)
return text[a:b]
Sept. 8, 2018