list.append(item)
myList = [1, 2, 3] myList.append(4)
my_list = [] item1 = "test1" my_list.append(item1) print(my_list) # prints the list ["test1"]
names = [yaron,roni] names.append(abram)
numbers = [1, 2, 3, 4] numbers.append(10) print(numbers)
food = "banana" basket = [] basket.append(food)
# to add an item to a list list.append(item) # To extend an list with a new list list1.extend(list2)
a=[8,5,6,1,7] a.append(9)
a_list = [1,2,3] a_list.append(4)