June 2017
Beginner to intermediate
274 pages
6h 49m
English
The next data type we're going to look at is a list, which can be created with the list expression. A list expression is just a pair of square brackets surrounding the data values we want to store in the list, with each value separated by a comma. It is not necessary that each of the values be of the same type. The code example for a list is as follows:

In the preceding example, they're strings, but they could be numbers, or a list, or any other kind of data mixed together. We can use a lookup expression to retrieve data values.
Unlike with a dictionary though, the keys for a list are integers. That's because instead of associating key ...
Read now
Unlock full access