Welcome back.
In this article, we want to learn this, they've been placed on the list, OK, both on the list are
one of the building database to be listed, one of the building database, and they are used to store
collection of data.
Collection of data means destroying multiple items, multiple items in a single variable death, total
collection of items in a single variable.
So let's see, there's the list with some examples.
OK, so now first we have to create a variable rate.
So a variable variable it costs and now a list and a list are created using a square bracket.
OK, so this is all it will cost.
And now I'm going to put a square bracket here.
It's a square bracket and incentives square bracket.
We can place multiple items, OK, and multiply it.
These multiple items.
We can separate this, we can place these items using the comma.
OK, it's.
I'll be listed, right?
So we owe it to our list to bring this list.
OK.
And, you know, put it is our list, OK?
This is only straight.
So let's make sure, as we are already seeing in this bank function.
Right.
We are already seeing the tape function and it will be used in its function, is used to check the database.
So let's get it out for this cost.
As you can see here, it's a list Rio, our list here and and Rio confirmed there today is a list read.
So determined to find out how many items the list has became, is this then functional this year?
And if so, let's see with the example that we already released.
So this information is stands for and OK, and it's used during the number of items in the list.
OK, so let's see.
Let's use this function in this example here and then our.
Well, which is because if there's no criminal intent on this list.
OK, so here you can see in the real four items in this list, OK, this is the use of the functional
tools to find out how many items that list as be.
So now we know of four items in our list, these four items, and remember this, the list we have to
start counting in by the numbers from zero.
Okay, so get these items are indexed and the first item has a zero index.
So this has zero index.
Right.
And then this one and two and three and so on and so forth.
So you found a particular item of this list then?
We have to use this index talking if you want to bring this up.
So zero one and we after the first indexed item from here.
So this and here you can see the Honda in the output.
So this is how it works.
These lists are indexed and indexed, stacked from zero.
The list items and database, the list albums can be of any did, OK, so the item in this list can
be added and it can be a string literal or they can be.
No, it's part of the flu or any did OK.
And it can be a bit of a did the items instead of the list can be off immediately and also it can be
a combination of different entities.
Well it can be a combination of strings and numbers of extremely and integer aslambek flaws like integer
and flawed as well.
Let's see a quick example.
At these items, HealthSpring, where they break the inside of this list, will items and these are
items the other day instead of this list.
OK, so let's put another variable here.
OK.
So here we are, one list here and inside of this list, we are sitting there today and any other list
here and sort of this needs to be a new entity.
So at least we can put into it.
OK, so let's bring this back.
You can see this.
This is all OK.
And we can also combine this data and combine these different databases in one list.
Talking to accounts like this has been there.
See one example.
So here we are once again.
So let's put a number here and separate it because so here you can see in this ghastly example, we
are sitting here, this an distinct then we have no digital database and then we're guessing.
And again, no.
And this is true.
This is a billion data.
We and we will see this data in the next two years.
So this is another data.
And then we have looked here so we can combine different data in our list.
OK, use the same data for the list.
We can also combine the different entities in the list.
OK, so let's bring this last one.
So here you can see and feel different and now least.
So we've already seen at least elements from the start, right, and there is another way to access
the list.
OK.
And it's called the negative index.
OK, so we know X is the element that we have.
X is the list.
Start right from this side, right starting from this side.
Right from this Raynald.
And there is another way we can we can also X is the list from the end, OK, from the end means that
on this side, OK.
And it's called negative indexing.
OK, so from the start, this is a proper way to access the list.
And there is another way.
It's called the negative indexing means the items you can access from this state.
OK, so this negative indexing starts from the end, OK, from this date.
So now in the negative indexing, the last item, the last item here is this letter.
So this item, the last item is referred to as minus one.
OK, and then this second last item, which is an E on here, is referred to as a minus two.
And then this is minus three on is minus three.
The last item will always be minus one and then minus two second class and then so and so forth.
So let's see the list.
Negative indexing with the example.
OK, so here we have an example.
We have list here.
Let's get access to the item on this list, on the list.
I want to bring minus three, so.
As you can see in this output, we get on minus three on this day, minus worklessness and minus two
and then the Honda B minus three.
So this is how Negrita indexing in the list to work to get the last item will be minus one.
OK, and let's do another item here.
OK, let's bring minus.
So we operate in minus one, and here you can see again, we'll put here minus three, which is the
Honda and minus one, which is the Tesla.
So this is the negative indexing python linked to the indexing of the list in Python.
OK.
So this specific elements to the specific elements of the list, we can use the range.
OK, but what this does is it will give us specific elements or specific elements from the list.
So we hope to select the value of these elements, the value of these listed elements here and why the
value of this selected list.
And with that value, we can access these elements of the return value will be a new list.
OK, the new list can be printed in the open.
OK, so let's see with the example.
So we have a list here and we help six out of six elements here.
OK, in our list, as always, remember that first item has index zero, right?
This item has failed because you law this.
Rainard has zero.
And let's let's drink.
So brand means squared squared.
Back to you.
And you just quarterbacked the brand.
Okay, so let's say values group, then the corner.
And now what will happen is this will be a zero zero one group.
So from this to from this group, all items printed out from this.
So let's see what what happens here.
This Prentis and as you can see here, the Nissan Tesler and BMW from this front to the all the items
are going to be printed in the terminal.
OK, and let's put another example here.
So now in this example, overtrained the value output of Eldo and the right side or the right side of
this colon.
OK.
Now, what will happen?
So let's see what will happen here.
You can see and I'll put the first one at the left side, the values side, and we will get to all the
items that print of this weekend.
And in this second example, when I put the value the right side of this coin, then I will get all
the items that are in front of this of this value.
OK, so here in this second example, we will get zero zero one, two, three, four.
So what this really does is it will cure specific elements from the list, like we hope to celebrate,
to start the list and work within the next hour, we can select where to start the list and where to
end the list by using its values or or the index or the indexes of the list.
Again, when we finally arrange the return value, it will be a new list or, you know, put in there
to put the value in the items we have selected.
OK, so let's go.
For example, here is how to use this square because OK, so square because in the square bracket we
have to select the starting point of the list, starting to start element index of this element.
OK, so here we have six elements here.
So let's say you want to start the list from this second item, OK?
Second element.
So OK, so you have good value here.
So let's head to then.
This colon is used to separate and then the end of the list.
So let's say the interval before.
For now, let's bring this again.
So here we get to talk about two and four.
So what happened here?
We just selected the range two and for the item blueprinted will be in between these two and four.
So it will be printed, but not for the list.
And the list will end and the poor will be not included here.
OK, so in this print, another here.
And you can see in the output we get these three, this item has indexical three and then four, which
is this one day, and we will not get out of with who I am.
Okay, so this is the range of the list.