Files
freeCodeCamp/guide/english/python/lists/list-append-method/index.md
JawnsenTrain d2c9a45f21 Added more info about the append method (#26478)
* Added more info about the append method

Added the detail that the method adds the argument to the end specifically.

* Removed redundant point
2019-01-05 16:25:27 -05:00

712 B

title
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/adds the argument to the end of the 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