how to reverse a string in python using indexing code example Example 1: how to reverse a string in python 'your sting'[::-1] Example 2: python 3 slice reverse stringname[::-1]