def between_markers(text: str, begin: str, end: str) -> str:
"""
returns substring between two given markers
"""
index_begin = text.find(begin)
index_end = text.find(end)
return text[index_begin+1:index_end]
if __name__ == '__main__':
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('>apple<', '>', '<') == "apple"
print('Wow, you are doing pretty good. Time to check it!')