December 2021
Intermediate to advanced
352 pages
10h
English
In this chapter, we’ll look at a few ways to represent lists of data. We’ll start by writing code to read in a list of states, along with some of their data. Then we use these entries as examples for display, to easily find tables of all the U.S. states and their capitals and population data. When writing this book, we extracted the data from a table on Wikipedia and used Word to convert them to a comma-separated list. Here’s how some of that data looks:
Alabama, AL, 1819, Montgomery Alaska, AK, 1960, Juneau Arizona, AZ, 1912, Phoenix Arkansas, AR, 1836, Little Rock California, CA, 1850, Sacramento
The full file contains 50 lines of comma-separated data. You can either read ...
Read now
Unlock full access