Bosch interview question

String reversal coding question from python