Python list method append() appends a passed obj into the existing list.
Following is the syntax for append() method -
This method does not return any value but updates the existing list.
The following example shows the usage of the append() method.
#!/usr/bin/python aList = [123, 'xyz', 'zara', 'abc']; aList.append( 2009 ); print "Updated List : ", aList
When we run the above program, it produces the following result -
Updated List : [123, 'xyz', 'zara', 'abc', 2009]
Here at Intellinuts, we have created a complete Python tutorial for Beginners to get started in Python.