a.reverse() python code example
Example 1: reverse in python 3
number = [1,2,3,4,5]
number.reverse()
print(number)
Example 2: reverse list python
list=[1,2,3]
list[::-1]
Example 3: python reverse list
systems = ['Windows', 'macOS', 'Linux']
print('Original List:', systems)
reversed_list = systems[::-1]
print('Updated List:', reversed_list)
Example 4: reverse function python
Some_List = [1, 2, 3, 4, 1, 2, 6]
Some_List.reverse()
print(Some_List)
Example 5: reverse() in python
systems = ['Windows', 'macOS', 'Linux']
print('Original List:', systems)
systems.reverse()
print('Updated List:', systems)