• Problem with check

Question related to mission Between Markers

 

Dear all,

It is second time I have a problem with check rules. While I am checking it in the program it works fine with all cases, when put it into check mode it is failed. Anuone can help?

def between_markers(text,init,end): x = text.find(init) y = text.find(end) if x < y and x!=-1: final = print(text[x+len(init):y]) elif init not in text and end not in text: final = print(text) elif x > y and y!=-1: final = print('') elif init in text and end not in text: final = print(text[x+len(init):]) elif end in text and init not in text: final = print(text[:y]) return final