November 2018
Beginner
304 pages
7h 35m
English
Lists are most often used to store homogeneous values; that is, a list usually holds names, numbers, or other sequences that are all one data type. They don't have to; they can be used with whatever data types you want to mix and match. It's just usually easier to think of a list as holding a standard sequence of items.
The most common use of a list is to iterate over the list and perform the same action to each object within the list, hence the use of similar data types. This simple iteration is shown in the following screenshot:

Line 48 defines the list as a sequence of string values. Line 49 creates a for loop ...
Read now
Unlock full access