Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
One line solution in Creative category for Between Markers (simplified) by dima87g
between_markers = lambda x,y,z: ( x[x.find(y)+1 : x.find(z)])
if __name__ == '__main__':
print('Example:')
print(between_markers('What is >apple<', '>', '<'))
# These "asserts" are used for self-checking and not for testing
assert between_markers('What is >apple<', '>', '<') == "apple"
assert between_markers('What is [apple]', '[', ']') == "apple"
assert between_markers('What is ><', '>', '<') == ""
assert between_markers('>apple<', '>', '<') == "apple"
print('Wow, you are doing pretty good. Time to check it!')
June 4, 2019