Hey I've even seen the last video we have done with the mentors.
No.
In this video we are going to cover the indexing and slicing.
That is we have also done with the least and that nearly seem like the least.
So here if you have a list or we can just create one with the and B don't agree and we will use the
range function instead of this one.
So we have.
And let me create something like from 1 to 20 or 21 so that 20 will also be included.
So now x x here we have this 1 1 2 20 now.
Simple like the list if you want to access any element like I want to access 9 so it will be on the
index 8 and here we have 9.
If you want to access element from negative then we have here minus 1.
Only 20 you can access early element you want to by 13.
Here we have 40 and slicing also same for the one D.
That is you can just use like from 0 to up to 10.
You will have one group.
And here we also get the 10.
But we do not get the end.
All we can see that the range on that one.
Actually this 10 is for eleven because the 11 is on the next end.
So I have used that zero also otherwise it will confuse you a little bit.
So here we have this one now.
And if we do the same things here we will get the results like these.
And now here we have nine.
Then I begin from zero.
And if you want the last one from ten like from after the tenth you can do something like this one then
you will get the upper portion.
That is from 10 to 20.
Here we have up to nine.
And you can slice portion like from two to five.
Then it will include 0 1 2 from 2 to 4.
Upper will not be counted.
So here when you hit enter you have two three and four.
So that's how you can also split the list.
And here we have nine.
So this is these slicing off lists and that tone is indexing in case of one day.
Now one more thing about the when the slicing is like here we have done these if you want to have slicing
with negative ones.
Then if I do from negative 10 to negative 1 you can just pass the values in negative.
So that's how in the negative.
Then we have the 11 and we have done a two minus over one.
So here 20 will not be included because that one is the range.
In that case here this one is orange.
So that is how you can split the list with negative numbers also.
Now and then the thing that is something like If you have a variable flight and that is equal to x so
like let you take something like from 5 to 50.
And to assign them a value like here for the hit enter.
If you print why you will have the numbers of element that will be in five to 15.
That is 1 2 3 4 5 6 7 8 9 10 and 15 is not included.
So 10 element but all the elements will be equal to 40 because we have assigned a value 40.
And now if you tried to print Excel so that all elements that are in there replaced by 40 because this
latest portion that the variable VI has now is the same part of this one we are just visualizing that
part.
And if you make any changes with that the changes will also currently or is null.
So to make any changes in any of these list you can just copy that list and to copy just right next
door copy and differences shift enter.
Now if you print why you have that one equal to x that is 0 1 2 3 4 and then all default is up to 15
then from 15 to 20.
Now you can make the changes invite directly instead of making changes X and assigning that do y.
Now the original will not get replaced if you do the same thing like here.
This one.
Come on see here come on V.
And now this one is already way and let this one be it the So shift center.
If you have I know all this will become a D and the X is like the original then that is the 40s.
So that's how you can make changes in any list by copying that list and performing the operation.
So in the next video we will do the same thing with two dearie or two remarriages so thanks for watching
and seeing in the next video.