Python List reverse() Method

❮ List Methods


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.


❮ List Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.