Bosch Interview Question

String reversal coding question from python