Copyright © tutorialspoint.com
This method appends a passed obj into the existing list.
list.append(obj) |
Here is the detail of parameters:
obj: object to be appended in the list.
It returns none but updates existing list.
#!/usr/bin/python aList = [123, 'xyz', 'zara', 'abc']; aList.append( 2009 ); print "Updated List : ", aList; |
This will produce following result:
Updated List : [123, 'xyz', 'zara', 'abc', 2009] |
Copyright © tutorialspoint.com