Python List reverse() Method
Reverses the order of the list.
Syntax
Python
Copy Code
list.reverse()
Example
Python
Copy Code
groceries = ['apples', 'oranges', 'paper towels'] groceries.reverse() print(groceries)
Output
['paper towels', 'oranges', 'apples']