Adding and Removing Items in a List : Append « List « Python Tutorial






list1 = ["One", "Two", "Three"]
list2 = ["Five", "Six"]

print list1

#Append item
list1.append("Four")
print list1








7.2.Append
7.2.1.The append method is used to append an object to the end of a list
7.2.2.Adding Elements to a List
7.2.3.computed some Fibonacci numbers
7.2.4.Uses a string as the sequence to create a list of characters in the string
7.2.5.Adding and Removing Items in a List