Lesson 8Understanding Basic Data Structures: Lists

In addition to storing a single value in a variable, Python supports data structures that allow us to store multiple elements in a single variable. In this lesson, we will introduce several such structures and then take a closer look at lists. Python uses lists and these other structures as basic data types with specific features associated with each.

DATA STRUCTURE OVERVIEW—PART 1

In Lesson 5 we discussed several specific types of control structures that are used to control the flow of data through an application. As business problems have become more complex, developers have created data structures to help solve them. In Python, we use data structures to combine several values into a single unit. We do this so that each combination can be processed as one entity. As we have learned, a string is a specific data structure that organizes text as a sequence of characters. Similarly, lists, tuples, dictionaries, and sets organize data values. In this lesson, we will cover lists. In the subsequent three lessons, we will cover each of the others: tuples, dictionaries, and sets.

Variables were introduced in Lesson 2.

Get Job Ready Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.