Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and The Cloud
by Paul J. Deitel, Harvey M. Deitel
5.1 Introduction
In the last two chapters, we briefly introduced the list and tuple sequence types for representing ordered collections of items. Collections are prepackaged data structures consisting of related data items. Examples of collections include your favorite songs on your smartphone, your contacts list, a library’s books, your cards in a card game, your favorite sports team’s players, the stocks in an investment portfolio, patients in a cancer study and a shopping list. Python’s built-in collections enable you to store and access data conveniently and efficiently. In this chapter, we discuss lists and tuples in more detail.
We’ll demonstrate common list and tuple manipulations. You’ll see that lists (which are modifiable) and tuples ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access