Python List reverse() Method
Example
Reverse the order of the fruit
list:
fruits = ['apple', 'banana', 'cherry']
fruits.reverse()
Try it Yourself »
Definition and Usage
The reverse()
method reverses the sorting
order of the elements.
Syntax
list.reverse()
Parameter Values
No parameters
Related Pages
The built-in function reversed() returns a reversed iterator object.
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.