 Okay, so the syntax is up here. You have the keyword for followed by a variable, the keyword in a container. Okay, this container here is sometimes referred to as an iterable container. Okay, that means something that can be counted or you can loop through that content. So an example of container in this case would be a string. Okay, so strings are containers because you can count each individual character in the string. Right, when we learn lists and dictionaries and so on there, you will also see that those are also containers. But for now, we're going to look at two things, two types of containers. One is a string and the other is what's called a range. Down here is another diagram to show you what that one of those container is. It's called a range. A range is a special function in Python that is very useful as well that you can return a range of numbers and only numbers, okay, integer numbers from a starting point to the stopping point or number. And also it gives you a step value, it's an incremental or decremental value. Okay, so let's take a look at the for loop and I'll show you also the range, what that looks like in the code and what they mean. Okay, so let's go over to the help menu over here and let's type in search for range. You're going to see this help menu here and need to understand what's going on here first. So the range function, inside the range function as you can see, this is the function, this part right here. Inside the function there are three parameters. We have a stopping, the first number or the first argument is the stop, the start, I'm sorry, then the middle is the stop and then you have a third one here is called the step. As you can see it puts a, let's say, score bracket around it. So this is just a syntax, a notation telling you that this is optional and you don't have to include it. And then the start is also kind of optional but you can also change the start value to something else besides zero. If you don't include the start value then it will default to zero. Okay, by default always. And that's what you see up here is a range followed by the stop value only. It ignores the start and the step. Okay, so the step is defaulted to one, a positive one and then the start is defaulted at zero. And then the stop is the stopper, right? If you remember the value, it's like that set no value. I want to stop. Okay, so that is the range. So for example, if I go down to the terminal and I type in the function range, if I pass into this function, let's say five. Okay, so if I only include one number in here, one value, this value here will automatically be set to the stop value. As you can see here, this is a default. If one value, then the stop is the value and then the start number will again is zero. So if I hit enter, you will see that the range is from zero to five. Okay, it does not show the step. The step is, it's done implicitly behind the scene. It's going to be a step of one. So it's a counter. You count from this number zero inclusive all the way to five. And this number here is not inclusive. Okay, it's exclusive in the stopping value. So in this case, if you were to count, the step is one. So it'll be zero, one, two, three, four, and then you're done. Right? Okay, so that is the default range. So if I do again range to a thousand, same thing, zero to a thousand. So to like nine, nine, nine. Okay. If you want to include that starting point, because sometimes maybe you don't want to start from zero, you want to start from 10. So you would do range. I want to start from 10, 10 to what, 10 to 100. So you can see that on the range number is now is overwritten. The start value has been overwritten to 10. So you start from 10 instead of zero. Okay, so sometimes that's important. And so again, it doesn't show the step. If you want to say, okay, I want to increment these count by two, then you have to explicitly include that in the range. So you would do range from 10 to 100 and print every other number. So you're skipping two numbers. In this case, I'm printing 10, 12, 14, 16. And then once I reach, there's a counter that's going on behind the scene, which you don't see. This counter will increment as you use the full loop you'll see in a minute. Once you reach the number of 100, once it exceeds that, or reached that point, it is no longer true, it will stop. To go the other direction, you can also go negative by setting this third variable to a negative value. So if you want to do that, you have to explicitly do that as well. So if you want to count from 10 down to zero and go into negative direction by two. Okay, so you count 10 first because you are starting here. So if you are reversing the direction, just make sure that the starting value is larger than the stopping value. As long as the starting value is greater than zero, because I'm going negative direction, then you will run. Okay, so you can go positive or negative direction, just make sure you swap the two numbers here. So that is pretty much the range. And the range is important because it's a really important part of the full loop. So let's go over here and write our full loop. So the four followed by a variable name. Okay, so if you want to print a number like we did before with the while loop from, you know, a one to 10. So you would do something like from a number, any number in just a variable name, and the range from zero to 10. Right. And the step is again a plus one. So remember that 10 is not inclusive. So in this case, I'm going to print only from zero to nine. If I print the n value, you're going to see that it's going to print zero to nine only, as you see over here. Okay, this is zero to nine, because 10 is not inclusive. If you want to include 10, then you have to put 11 here. So now I print from one to zero to 10. So just remember that this is not inclusive, the stopping value. Even if you go the other direction, if you want to go the negative direction, then the third variable over here has to be a minus one, if I counting one at a time from, right, from what to what, in this case, I'm not going to get anything because it's already false, because the from value is already larger than this. I mean, smaller than the stop values, therefore, it's going to be false. If you see that if I print and run, it's not going to show anything in my console, nothing gets printed. That's why it must be carefully designed. So let's say from 10 down to zero, if you want to include zero, then you want to go to a minus one, all right, because again, it's not inclusive. So now I'm going to go 10, 9, 8, 7, 6, all the way down to zero. Okay, so the negative direction. So this in here, it stores the, in this case, stores the counter from the starting value. So what are these sort of value is initially and it will store the value first. And after that, it runs to one, the body one time. However, statements you have in here runs one time. And then after that, it's going to check this increment. This is the update. It updates the counter by a minus one. So the nation was 10. So now n is now nine. And if it's nine, then it's going to compare that value against the stopping value. Is it greater than one? If it is, then yes, keep going until this is no longer true. Okay, so that's happening behind the scene, which is why you saw earlier that initially when I put a zero here, it didn't work. But something more meaningful is, for example, if you want to print, say that the first three characters of your word and the word is going to be say Python, this three here. So what you do is n starts at zero because we didn't input it, we included zero. So instead of printing zero, I'm going to say, I want the word, then the square bracket of n, right, the position n is zero first. So this is the zero position, it's going to print the letter p, and then I'm going to increment by one, then the y, and then the t, and then at the point we stop. So again, just print three letters. And then and then you see here, we have the letters p, y, t, because notice that I'm using n as the index of this word to get those letters out, right? So use it for this scenario. If you want to get, you know, just the every other character starting with p, how would you do that? You can just go over here and change the range. I'm going to start from zero position, stop at, I can go all the way to, let's say the size of this word, how many characters it has. Well, I don't know, you can know by using the function called lend, right, the length of the word that gives you the total characters in this word, how many there are, it will give you that. So in this case, it's going to be six. And then I'm going to step through two. So you'll print every other characters, right? So p, t, o, and then I'm done, right, p, t, o. So you can see how easy this is in Python.