$list.reverse()
Returns the given list in reverse order.
| Name | Type | Description | Mandatory | Default |
|---|---|---|---|---|
| list | Set | List whose order is to be reversed. | yes |
Type: Set
The given list in reverse order.
list(1, 2, 3).reverse()
Output: A list with the elements [3, 2, 1].