list append python 3 code example
Example 1: add item to list python
list.append(item)
Example 2: append to list python
list = ["a"]
list.append("b")
print(list)
["a","b"]
Example 3: how to append list in python
list1 = ["hello"]
list1 = list1 + ["world"]
Example 4: python list append
history = ["when"]
history.append("how")
history.extend( ["what", "why"] )
history = history + ["what", "why"]
history.insert(3, "where")
Example 5: using append in python
lst=[1,2,3,4]
print(lst)
lst.append(5)
print(lst)
Example 6: list append python 3
list1 = ['C++', 'Java', 'Python']
list1.append('C#')
print ("updated list : ", list1)