Function Details: reverse

Description


Reverse the elements of the list in place.


Extended Description


The reverse() method reverses the order of the elements in the list. It modifies the list in-place and doesn't return a new list. This operation is done in linear time.


Function Signature



Module: list

Class: list

Parameters



Return


This method doesn't return a value. It modifies the list in-place.


Return Type


None

Output

Explanation

This example demonstrates the basic usage of reverse(). It reverses the order of elements in the list.