List reverse( ) Method
Syntax
list.reverse()
Return Value
This method does not return any value but reverse the
given object from the list.
Example
#!/usr/bin/python3
list1
= ['physics', 'Biology', 'chemistry', 'maths']
list1.reverse()
print
("list now : ", list1)
|
When we run above program, it produces following
result
list
now : ['maths', 'chemistry', 'Biology', 'physics']
|
<<< remove( ) Go to Index sort( ) >>>