Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First: two if-conditionals and slicing solution in Uncategorized category for Between Markers by leggewie
def between_markers(text: str, begin: str, end: str) -> str:
if begin in text:
begin_index = text.find(begin) + len(begin)
else:
begin_index = 0
if end in text:
end_index = text.find(end)
else:
end_index = len(text)
return text[begin_index:end_index]
May 30, 2021