What is List Append() in Python?

Python list append function is a pre-defined function that takes a value as a parameter and adds it at the end of the list. append() function can take any type of data as input, including a number, a string, a decimal number, a list, or another object.

How to use list append() method in Python?

It is very easy to use function you just need to call function with list object and passing value as parameter.

Adding elements to the end of a list with Python’s append() method increases the list’s size. It offers a practical method to add one or more elements to an existing list. Here is an example of using the List Append() method.

Python List append() Method

Python list append() method is used to add elements at the end of the list.

Example

Python




list=[2,5,6,7]
list.append(8)
print(list)


Output

[2, 5, 6, 7, 8]

Similar Reads

Python List Append() Syntax

...

What is List Append() in Python?

List_name.append(element)...

More Python List append() Examples of

Python list append function is a pre-defined function that takes a value as a parameter and adds it at the end of the list. append() function can take any type of data as input, including a number, a string, a decimal number, a list, or another object....