Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python List reverse() Method
Description:
This method reverses objects of list in place.
Syntax:
Parameters:
Here is the detail of parameters:
Return Value:
It returns none but reverse the given object from the list.
Example:
#!/usr/bin/python
aList = [123, 'xyz', 'zara', 'abc', 'xyz'];
aList.reverse();
print "List : ", aList;
|
This will produce following result:
List : ['xyz', 'abc', 'zara', 'xyz', 123]
|
|
|
|