Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Between Markers (simplified) solution in Uncategorized category for Between Markers (simplified) by Antoni_Wojcik
def between_markers(text: str, start: str, end: str) -> str:
first = text.split(start,1)
second = first[1].split(end, 1)
return second[0]
print('Example:')
print(between_markers('What is >apple<', '>', '<'))
assert between_markers('What is >apple<', '>', '<') == 'apple'
assert between_markers('What is [apple]', '[', ']') == 'apple'
assert between_markers('What is ><', '>', '<') == ''
assert between_markers('[an apple]', '[', ']') == 'an apple'
print("The mission is done! Click 'Check Solution' to earn rewards!")
Nov. 22, 2022