Pergunta de entrevista da empresa RBC

Reverse string using python (performed on hacker-rank like website)