Python List reverse() Method
Example
Reverse the order of the fruit
list:
fruits = ['apple', 'banana', 'cherry']
fruits.reverse()
Run example »
Definition and Usage
The reverse()
method reverses the sorting
order of the elements.
Syntax
list.reverse()
Parameter Values
No parameters
Related Pages
The buil-in function reversed() returns a reversed iterator object.