how to reverse a number in python using indexing code example Example: python 3 slice reverse stringname[::-1]