 Lists are great for things like weekly temperatures or monthly sales, where you naturally index by position when you put the data into a Python list. But how would you represent a table like this in Python? One way to do it is with parallel lists. Here's a program that sets up two lists. The first list contains the country names, and the second list has the population for each country at the corresponding index. The program repeatedly asks for a country name. If the country is in the country's list, we find its index number, and go to the corresponding entry in the population list to print it. If the country the user entered isn't in our list, we print a message to that effect. Let's give a little more space here, and run the program. So, for example, if we need the population of Spain or Greece, we get the output. If we enter a country that isn't in the list, we get the message. Let's say we want to add Chequie's data to this program. We need to put it in the country list, which happens to be an alphabetical order, so we'll put the name here. Now we have to be careful to put the population in the correct place in the other list, which will be here, and it's 10,610,947. Once we do that, Chequie is now available. It works, but the process of having to update two lists is error-prone, and it's just awkward. What we really want is something like a dictionary. When you look up Denmark in a dictionary by its name, there in the description is its population, much like our table here. That's exactly what a dictionary in Python lets you do. Here's the start of a dictionary-based version of the program. Instead of two lists, we have a dictionary. When you create a dictionary, it's enclosed in braces rather than square brackets. Inside the braces, we put pairs of keys and values separated by a colon. The key is the thing we want to index on, and the value is the information corresponding to the key. When we access a dictionary, we still use square brackets, but we put a key inside the square brackets rather than an index number. Let's do this again with another country. If you try to access a key that's not in the dictionary, you get an error. You can test to see if the key is in the dictionary by using the in operator. For example, Denmark in country pop is true, Slovakia in country pop is false. Now that we know this, we can complete the program. Let's get rid of the pass here and say, if the country is in the country pop dictionary, then we'll print population of and the country name, and its population by getting the value from the dictionary. And let's format that with commas and the sentence, and there's our output for countries that are in the dictionary. Otherwise, the country isn't in the dictionary, and we'll print a message. Cannot find country. That's it. Let's run the program, and again, for a country that's not in the list, we get our message. What advantages have we gained by using a dictionary? First, the key and value are together. They're in the same data structure. If I now want to add Czechia, I can add it to the dictionary with its name, a colon, and its population, and I have one data structure to update instead of two. There's no question about keeping the number in the right place. It's joined to the key. Let's run the program to make sure that we got it right, and yes, it's in there as are all the other countries. And that's a dictionary, a way to represent data where a key and value are associated with one another.