Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Suppressing solution in Creative category for Between Markers by flpo
def suppressed(f):
from contextlib import suppress
def wrapper(*args, **kwargs):
with suppress(Exception):
return f(*args, **kwargs)
return wrapper
def between_markers(text: str, begin: str, end: str) -> str:
from operator import add
t = suppressed(text.index)
return text[suppressed(add)(t(begin), len(begin)):t(end)]
Nov. 13, 2017