 If you're looking for a tutorial on how to use lists in Scratch, well hang around because in this Scratchery Basics tutorial, I've got an example that's going to make you a boss of ScratchLists in no time. Coming up. Hello world, Surfing Scratcher here, teacher-surfer programmer bringing the goodness of learning to code through video tutorials. If that sounds like something that you're into, then consider hitting that subscribe button. Hit that show more button below, check out the show notes for links to activities and information that can help you and your learners along on your learning journeys. Alright, let's tick off lists. I'd like to pick up from where we left off with our variables tutorial. If you haven't checked that one out yet, there's a card in the top right corner for you. But essentially, a variable is something that we store, more specifically a value and it can be a text or a number value represented here by this box. So if you know what a variable is, then lists are easy. Lists are basically just a whole bunch of variables grouped together, as illustrated here by all the boxes I've got in this room. All of our variables or boxes look a little unorganized. Luckily, lists organize them for us. To illustrate this, we need to go outside for some fresh air. Ah, that's cool. Right, here we are on Boxy Street. We're going to be using the idea of a street to understand lists. I want you to take a moment to think about the street on which you live. On your street, there is probably some houses and each of those houses have numbers on them so that we can locate them. It's the same deal for lists. Let's use the name of our street to create our first list. Head on over to the orange variables category and we're going to skip over all these variables and check out the button that says make a list. We're prompted with a dialogue and just to show that we are going to use the street name, I'm just going to type in Boxy Street there. You'll see that we've been given this little list editor on the stage. It's also giving us some access to some of these blocks that we can use for lists. We have nothing on our Boxy Street here on the graphic and we've also got nothing in our list yet. Now, I'm thinking that on most streets that I see, there are houses so we need to do the same thing for our Boxy Street. But instead of houses, we're going to be using boxes because remember, boxes mean variables. It's a great time to start exploring the stack blocks of lists. If you're not sure what stack blocks are, go check out the Scratch Blocks Explained tutorial coming up now. We've got six boxes. Let's go add six things to our Boxy Street. So if we drag out this add block, we can add a thing. I'll press it and one thing has been added to Boxy Street. If I press it again, look a second item comes in there. I can change the text and go hello. Let's add the word hello. Great. We're adding text here. We've added three text values and now let's type in some numbers. So let's add one, two, three. We can also add to our list by pressing the little addition icon here and we can type it directly in. So there's another number. I pressed enter there to add one beneath it. I can also hold down shift enter and that adds an item above the one that we just got currently selected. You can press the cross here to delete that item as well. Let's check out the next stack block and that is deleting one of Boxy Street. What this says here is it's going to delete the first item of Boxy Street. So how do we know which one is the first item of our boxes here? Well, just like your street and the houses on your street, they all have numbers. So let's go ahead and give our boxes numbers just like the numbers that we have here in our list. One, two, three, four, five, six, two, three, four, five, six. Now, remember in our variables tutorial, we were giving names to our variables here. We just refer to the specific location in the list by a number. So if we press delete one of Boxy Street, we should delete the first thing. Boom. I've also just deleted our six box to reflect the same thing in our list. Now we don't have to delete the first item. We could delete say item four, number 78. So delete four and there it goes. Let's go check out the next act. Well, delete all of Boxy Street. I hope it's pretty clear what this book does. We should see all of our items go. There they go. All right, let's check out the next act. Well, that is insert something at a particular place. Now, there have to be some items in our list to actually insert this one. So we can't insert that place too because there are currently no items in our list. Let's get some items in our list. I have here, hi, my name is Scratcher. Well, my name is Serping Scratcher. So I'd like to at item five, insert the word Serping. Insert Serping at item five. Watch what happens when I press this. Boom. Hi, my name is Serping Scratcher. Check out our last act. Well, that's when we can replace an item in this list. So we'll say hi, my name is Serping Scratcher. Let's replace item five to say Peter. And you'll see their item has changed to Peter. So hi, my name is Peter Scratcher. Let's change item six to Parker. Look at and Peter Parker. Let's now check out the list reporter blocks these rounded rectangles here. We recall that a reporter block just tells us the value. So here it's saying item one of boxy street. If we look over here, item one should be high. If I press this, we should see high. If I refer to item four, we should see the word is and we do. This next block is pretty cool. Item number of thing in boxy street. So what this is doing is it's going to return the position of a value in our list if the value exists. So if we want to check out Peter, we know that the position is five in our list. So if I type in the word Peter and I press this, we should get the number five. But if I have a typo here, which I did before and I click it, we get zero. So Peter does not exist in our list. Let's check out the length of our list. So this is pretty straightforward. It just tells us the total number in our list. If I click this, we should get six. Let's now check out the only boolean block of our lists. And it's this one here. It checks to see whether or not a value is in our list. So it will return a true or a false value. It's saying here does the word thing exist in our list. If I press this, it should say false. Now, if I change this to Peter and I press it, it should say true and it does. Now this isn't case sensitive. So I can have a lower case P in there and press this and it will still evaluate to true. If I have a space after Peter and I press it, it will evaluate to false. So that's just something to consider. It's going to look for the exact term in here, but it isn't case sensitive. The last two blocks are stack blocks and they're pretty straightforward. If you've seen variables, you can hide the list on the stage and you can also show the list. There's just a couple of more things I want to touch on with lists. So you might have asked how many of these items can a list store? What we see here on our street, our street kind of goes infinitely, but that isn't the truth for our list. The maximum number of items that you can have in scratch for a list is 200,000. Another thing that you can do with the list editor here is you can resize it on the stage. So that's pretty cool to know. Another awesome thing about this is that you can right click them and you can export a list to a text file and you'll see here that it is come up down the screen. I can open it and it has exported my list to a text file. Hi, my name is Peter Parker. I can edit this list by putting my name back into replace Peter Parker. Hit the save button, head back over to scratch, right click, import, navigate to that text file and upload it and boom, surfing scratcher is back in place. That's all for the basic aspects of lists. I'll make a video in the future that discuss lists with a bit more detail, as when you start to make some pretty complicated scratch projects, lists underpin the data aspects of all that you will do. I'll leave a link to the scratch wiki article below in the description. Definitely go check that out. It's time for a scratchy question and I want to know if you know what lists are called in other programming languages out there. Drop your answer in the comment section below. Hey, thanks for checking out this scratch tutorial on lists. Like, subscribe, ring that bell if you're new around here and have a scout some of my other content which is on the screen right now. Hey, if you want to show your support for surfing scratcher, then jump on over to my Patreon page where you can join a membership tier and that also gives you access to some exclusive content linked below in the description. But until then, I'm off to go find a wave. I'll catch you in the next one.