Home >>Python List Methods >Python List append() Method
Python list append() method is used to append or add a given input element to the end of the list.
Syntax:list.append(elmnt)
Parameter | Description |
---|---|
elmnt | This is a required parameter. It defines an element of any type. |
fruits = ["apple", "banana", "mango"]
fruits.append("orange")
print(fruits)
a = ["a", "b", "c"]
b = ["1", "2", "3"]
a.append(b)
print(a)