The second article in this series, "Discover Python, Part 2:
Explore the Python type hierarchy, Understanding objects and
containers," introduces the Python type hierarchy, which
includes container objects. That article demonstrated the tuple,
which is an immutable sequence. The third article in this
series, "Exploring the Python type hierarchy, Introducing
Strings," introduces the Python string, which is also an
immutable sequence, but only for character data. As immutable
sequences, both string objects can't be modified once they're
created. If you need to modify one of them, you must create a
new container of the appropriate type to hold the new data. This
article introduces a new sequence type: the list, which is a
mutable sequence type that demonstrates a number of different
ways it can be used. When I introduced the Python tuple, I used
the analogy of a bag into which you can throw different items.
The Python list is very similar. As a result, it shares much of
the same functionality. One difference, ho