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