One of the 50 questions in this topic
How much do you know about Python?The append() method adds an element to the end of a list. For example: list = [1, 2]; list.append(3) results in [1, 2, 3]. Unlike insert() which adds at a specific position, or extend() which adds all the elements of an iterable, append() always adds a single element at the end, even if that element is another list (it adds it as a nested element).