concept append() in category python

This is an excerpt from Manning's book Hello World! Third Edition.
To add things to a list, you use append(). Try this in interactive mode:
Sometimes append() and extend() look very similar, but they do different things. Let’s go back to our original list. First, try using extend() to add three items:
>>> letters = ['a','b','c','d','e'] >>> letters.extend(['f', 'g', 'h']) >>> print(letters) ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']Now, we’ll try to use append() to do the same thing:
>>> letters = ['a', 'b', 'c', 'd', 'e'] >>> letters.append(['f', 'g', 'h']) >>> print(letters) ['a', 'b', 'c', 'd', 'e', ['f', 'g', 'h']]What happened here? Well, we said before that append() adds one item to a list. How did it add three? It didn’t. It added one item, which happens to be another list containing three items. That’s why we got the extra set of square brackets inside our list. Remember that a list can hold anything, including other lists. That’s what we’ve got.
insert() works the same way as append(), except that you tell it where to put the new item. append() always puts it at the end.