list reverse using slicing code example Example 1: python 3 slice reverse stringname[::-1] Example 2: python how to invert an array revArray = list(reversed(array))