Ampush interview question

Python string problem (tortoise and hare )