The list data type has some built-in methods that can be used with it. These methods are as follows:
list.append(item)
list.extend(iterable)
list.insert(index, item)
list.remove(item)
list.pop([index])
list.clear()
list.index(item [, start [, end]])
list.count(item)
list.sort(key=None, reverse=False)
list.reverse()
list.copy()
Let's take a closer look at what these methods can do.
The list.append(item) method adds a single item to the end of a list. This doesn't return a new list – it only modifies the original. The following is an example of this in use:
Python 3.6.1 (default, Dec 2015, 13:05:11) [GCC 4.8.2] on linux things = ["first"] things.append("another thing") things => ['first', 'another thing']