freeCodeCamp/guide/english/python/lists/list-append-method/index.md

684 B

title
List Append Method

List Append Method

There are many methods for lists, you can explore all of them by typing help(list) in your python console. One of them is the append function which, as the name says appends the argument given list.

Example Usage

words = ["I", "love", "Python"]
words.append("very much")
print(words)

Output

["I", "love", "Python", "very much"]

As you might have noticed the element "very much" is appended to the list.

More Information:

The official documentation for append() can be found here