python reverse a slice code example
Example 1: python 3 slice reverse
stringname[::-1]
Example 2: reverse function python
# The Reverse operation - Python 3:
Some_List = [1, 2, 3, 4, 1, 2, 6]
Some_List.reverse()
print(Some_List)
# Result: [6, 2, 1, 4, 3, 2, 1]