Java String Method To Reverse String In Python