Example 1
#a list
cars = 'Ford', 'Volvo', 'BMW', 'Tesla'
#append item to list
cars.append('Audi')
print...(cars)
Example 2
list = 'Hello', 1, '@'
list.append(2)
list
'Hello', 1, '@', 2
Example 3
list = 'Hello...', 1, '@', 2
list.append((3, 4))
list
'Hello', 1, '@', 2, (3, 4)
Example 4
list.append(3, 4)
list
['Hello...>", line 1, in
TypeError: append() takes exactly one argument (2 given)
Example 6
list.extend...list in python
how to add items to a list in python