This video is titled Simple Dictionary. So to start with a simple example of using a dictionary, and I'm showing it in a way that typically use it in this course. And that's has two sort of parts to it. One is that we typically define the dictionary as an empty dictionary using curly brackets. A lot like we do when we're using lists, and particularly if we define them or assign them before we use them in an iterative loop. But we'll see the difference from a list is that, I don't use a pen to assign them within the loop. So the structure is a little bit different. So again, they're defined by using curly bracket. And then when I assign these in a loop, and so I'm just using the iteration variable i, as a counter, as my key value for my dictionary. So, that key value is defined between brackets when I assign it following the name of the dictionary, and followed by an equals and then whatever I want to assign to whatever value, I'm going to assign to that current key within the loop. So I can run this, and I'm just going to print it out and we can take a look at the structure. So if we look at the structure down at the bottom, I can see it's showing me the key value pairs in this example. Of course all my values are the same. I'm just printing out the String or saving the String hello world over and over again but it is showing me that assigning to each key 0, 1, 2, 3, 4 since it's using the i as the counter, those become my keys. So, in this example, it doesn't look so different from the structure of a list. Although I do have key value pairs which I won't see within a list. The other thing that I want to point out here in the print out is, it does show me that it's in curly brackets, so I do know that it's a dictionary. And I would also be able to tell it's a dictionary structure because of the way the key value pairs are defined with a colon separating them, and then a comma between each pair. So let's, let's change this a little bit. We're going to comment this line out. And we'll uncomment this. And I'm going to create a nested loop. And actually let's move this, Up above this. So it makes a little more sense. Okay, so I have a nested loop. And so this is where we start to see how dictionaries really differ from lists. So my key can be really any type of variable, as I talked about in the lesson. But, one of the most important ones and particularly the important one for how we're going to use it, is that I can use a tupple as my key. And so, if I have a nested loop, I could use both my i and my j as my key to assign it to whatever, series of values that I want. So remember, I can also have, not just one value, but I can have multiple values. So what I'm saving in this is not only Hello World, but I'm also saving whatever my current i and j values are within my loop. So I'll be able to see those, when I print it out So let's run that. So I'm getting an error, expected and indented block. That means I'm indented too far here. So I need to Shift+Tab this And this has to be indented here. That was probably where my error was. So let's run it again. Okay, so that runs. This is a bit difficult to read in a long sort of string like this. So, what I've done down here is, created a copy of the same exact loop, my for i and j loop, and all I'm doing is printing out each key, what's being held within each key of the dictionary. One at a time sequentially. So let's run that. Let me turn this off, so we don't have that. Run itt again. Okay, so. Now, I'm seeing, of course Hello World over and over again. This is what it's printing out is the value, that's being held by whatever the current keys are in my dictionary. And this is because I'm printing out also i and j that shows me what the current keys are. So it goes first time through, it's also a good example of this sort of nested structure. The first time through i is 0 and then it goes through all of the j's, then it comes back out, then i becomes 1. Then it goes through all the j's again comes back out, eyes, two, so on and so forth. So it's actually a really nice example of what the structure of a nested loop looks like. Lastly, just for fun, I did setup this list of city names and held them in a list called city. And then changed my, My tupple here that's being created from Hello World to Hello with a space in it, and then followed by the city name and then just for kicks the i value. So we can run that, and see what that does, see how that prints out. So now at the end, it's showing me the i value which goes from zero to one to two and then it's going through assigning each city, it runs through the list referencing the index number j for each city within the list. And it prints those out also. So that's a brief introduction to dictionary, and in the next series of videos, we're going to look at how we can apply this structure to the 2D point matrix and what the advantages of that are.