Python Basics
Python Advanced
Python Useful References
Python Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
Python List pop() Method
Description:
This method removes and returns last object or obj from the list.
Syntax:
Parameters:
Here is the detail of parameters:
Return Value:
It returns removed object from the list.
Example:
#!/usr/bin/python
aList = [123, 'xyz', 'zara', 'abc'];
print "A List : ", aList.pop();
print "B List : ", aList.pop(2);
|
This will produce following result:
A List : abc
B List : zara
|
|
|
|