WEBVTT

00:00.260 --> 00:05.620
But this is this is not a not a very efficient way of doing it.

00:05.670 --> 00:06.490
You know why.

00:06.630 --> 00:13.660
Because this is the sequel to seeing something like this except to OK.

00:14.260 --> 00:15.610
Let me start in a variable.

00:15.610 --> 00:16.660
Let me call it a step.

00:16.950 --> 00:18.270
Right.

00:18.520 --> 00:26.740
So this is available this template template and teme all 10.

00:26.740 --> 00:33.110
So if I just print print up 10 if I print up tempo.

00:33.280 --> 00:36.550
Well you can get us this particular way.

00:36.730 --> 00:39.290
Now I want to access an element in that.

00:39.310 --> 00:46.320
So I will say Temple 10 bucks to once again.

00:46.450 --> 00:46.980
OK.

00:47.210 --> 00:50.260
And then this will give me 50.

00:50.380 --> 00:58.710
So you have four temples to you know if I now print or if I store it in something like a.

00:58.990 --> 01:02.750
And if I print they finally you get the value 50.

01:02.870 --> 01:08.680
But as you can see there is a particular temporary variable in being created when I do X of two.

01:08.830 --> 01:14.320
So when X of two is nothing but you're creating attempt to be readable and from that Temperley from

01:14.320 --> 01:17.750
the temporary numpad you are indexing the seconder.

01:17.830 --> 01:19.000
It's not very efficient.

01:19.000 --> 01:27.340
It causes it causes problems in the memory as well as time efficiency rather not by provides you a better

01:27.340 --> 01:33.820
way by saying instead of saying X of two and two it says just index it in this manner in this way.

01:33.820 --> 01:36.360
I do not create a temporary variable.

01:36.580 --> 01:41.540
I directly figured out for you what is of value and that's how I get that.

01:41.770 --> 01:43.070
Hope you're able to understand that.

01:43.300 --> 01:43.700
Right.

01:43.810 --> 01:46.410
So here we have.

01:46.420 --> 01:49.450
So this is the very sorry this is this one is the three for now.

01:49.450 --> 01:53.650
I can just print that out once again and then try and index it once.

01:53.920 --> 02:01.930
OK so this is the Army and I need to index it in such a way so if I say X of letter X of minus one what

02:01.930 --> 02:02.860
is that going to be.

02:03.280 --> 02:08.980
That's going to be the last 45 for 45 58 59 40.

02:08.980 --> 02:13.620
Now if I say X minus 1 and if I say I won.

02:13.840 --> 02:14.750
I won.

02:15.190 --> 02:18.240
The third element in that is the rally going to be.

02:18.300 --> 02:19.420
This is zero.

02:19.450 --> 02:21.360
This is one this is two.

02:21.510 --> 02:22.130
This is three.

02:22.150 --> 02:24.400
So it is going to be 50.

02:24.400 --> 02:30.650
So this is how a index a particular value which is there in particular.

02:30.770 --> 02:34.730
Now by adding hope you're able to want to go.

02:35.200 --> 02:39.580
So with this particular you know understanding this numpad.

02:39.610 --> 02:47.740
And you know why this particular indexing I can also index the last element by saying X of minus 1 come

02:47.740 --> 02:51.680
on minus one day or you have 40.

02:51.820 --> 02:56.740
So or you can also say X or 1 Come on minus 1.

02:56.740 --> 02:58.560
What is that 90.

02:58.660 --> 03:03.110
Because this is the first draw and the last column in that minus one.

03:03.490 --> 03:07.860
If I say minus two that's going to be the 45 to you.

03:07.960 --> 03:08.230
Why.

03:08.230 --> 03:10.880
Because minus one is the Index which comes.

03:11.050 --> 03:15.710
So this is the next of each of these columns are going to be 0 1 2 3 4 5.

03:16.210 --> 03:18.490
And the reverse index from the end.

03:18.490 --> 03:19.450
This is minus one.

03:19.450 --> 03:24.240
This is my stews minus 3 minus 4 minus 5 minus.

03:24.390 --> 03:25.050
Right.

03:25.050 --> 03:28.890
So this is the way the entire indexing works in.

03:29.070 --> 03:32.130
By adding right now along with indexing.

03:32.130 --> 03:41.020
There is a second thing that we need to see and that's all about we can what we can do is let's say

03:41.020 --> 03:48.070
indexing after indexing we say the next thing that I was told you that I will cover is slicing right.

03:48.270 --> 03:57.990
Is also a very beautiful concept in in what Titan or not pi has introduced it's it's quite amazing to

03:57.990 --> 04:00.150
figure out how things work that way.

04:00.150 --> 04:08.990
So first of all get printed and then let's analyze so slicing is nothing but you know cutting for pop

04:09.650 --> 04:12.550
or Sluys take a slice out of this out.

04:12.980 --> 04:16.440
Let's say for example I just want to slice this portion where.

04:16.520 --> 04:17.130
No sorry.

04:17.150 --> 04:22.430
I wanted this 45 78 15 and 18 I just want to slice this portion OK.

04:22.490 --> 04:28.940
So basically it's going to be a box or rectangle that it can be something like this you can slice something

04:28.940 --> 04:34.470
like this because there's nothing and get this box or rectangle but of course you can slice this much.

04:34.670 --> 04:35.190
OK.

04:35.300 --> 04:40.140
Or you know you can slice Yes but you can slice this.

04:40.190 --> 04:41.680
This is not allowed.

04:41.870 --> 04:44.020
You can slice portions of it.

04:44.030 --> 04:45.470
So how do you slice it.

04:45.730 --> 04:46.180
OK.

04:46.310 --> 04:51.830
Slicing is done with the operator called as a call and OPERATOR OK you have a colon operator which can

04:51.830 --> 04:53.480
be or a slicing operator.

04:53.480 --> 04:57.980
It is on the colon and we can do that very well with.

04:58.140 --> 05:01.030
Oh good you know by slicing it by saying.

05:01.340 --> 05:07.670
Let's say for example let's do it first of all four for us you know let's do it from one first so that

05:08.050 --> 05:15.310
you'll be more comfortable understanding slicing over there and then slicing it slicing with the audio

05:15.310 --> 05:16.080
too.

05:16.220 --> 05:22.410
So let's say you have one come up to come three come to four come of fives.

05:22.430 --> 05:23.190
Oh sorry.

05:23.200 --> 05:29.450
Let me non-sport let's not put numbers like this so that you don't get confused.

05:29.590 --> 05:31.050
Great call.

05:31.160 --> 05:39.880
So now if I say Why of course I can just access it by saying why are five what is why a five that's

05:39.880 --> 05:45.810
to what is 5 0 1 2 3 4 and 5.

05:45.970 --> 05:46.910
So that's true.

05:47.290 --> 05:55.690
So why if I but if I want to slice something like For example I want to say while I want to say y off

05:55.780 --> 06:00.960
and I want to get this much Boeotian for five to I just want to slice this much.

06:00.960 --> 06:07.770
So for what is the element what is the next number of 4 0 1 2 and 4 3.

06:07.930 --> 06:17.470
So I can say why a three Colin and go up to go to elementary This is four there's five.

06:17.480 --> 06:23.520
Now if I put five in on what will happen that is going to be it is just going to return to you for KAMAHL

06:23.540 --> 06:25.030
fight you this much.

06:25.040 --> 06:25.370
Why.

06:25.370 --> 06:27.560
Because this one is exclusive.

06:27.560 --> 06:28.940
This one is inclusive.

06:29.030 --> 06:32.100
So all I need to see here is why.

06:32.350 --> 06:37.640
All I need to make it out with are three Colin Six Day.

06:37.700 --> 06:41.270
We have so because six is exclusive I get it up to two.

06:41.360 --> 06:41.650
Right.

06:41.650 --> 06:43.010
So this is about slicing.

06:43.010 --> 06:49.520
Now if I don't put the first element if I just put Colin 6 it starts from the zero element and goes

06:49.520 --> 06:51.760
up to the sixth element.

06:51.800 --> 06:52.310
All right.

06:52.310 --> 07:02.840
Now if I put instead of say Colin six I would say you know I start from three but instead of saying

07:02.840 --> 07:04.670
Colin six I just put a call in.

07:04.730 --> 07:05.480
That's it.

07:05.510 --> 07:07.180
It will go from the turtle.

07:07.220 --> 07:10.960
That is from four and reported last the last seven.

07:10.990 --> 07:17.450
So it is about how slicing works it slices up bits and pieces of the Arey and gives you back what you

07:17.450 --> 07:18.530
require.

07:18.590 --> 07:23.300
Right so that's parts lazying when it comes to a one the arey.

07:23.330 --> 07:27.520
Now let's see how slicing will work when it comes to Turia.

07:27.530 --> 07:31.340
So this is about X and to rearrange.

07:31.340 --> 07:32.580
How will it work.

07:32.600 --> 07:33.700
So this is the one.

07:33.740 --> 07:36.990
This is the two Jaedicke correct.

07:37.580 --> 07:41.250
How will this work in Italy.

07:41.600 --> 07:43.550
I'll have something like these x's.

07:43.640 --> 07:46.550
It's this slicing.

07:46.550 --> 07:51.520
So I told you I can give though rule number first.

07:51.710 --> 07:55.820
So if I say two comma after the comma comes the column number.

07:55.820 --> 08:04.080
So I can say to come a five but now if I want a range of numbers I want to slice a range of numbers.

08:04.340 --> 08:12.180
Let's see I won the first two on words I wanted from this particular roll from the first four.

08:12.200 --> 08:17.890
Basically I want these four elements for 578 15 and so I want to slice these four elements.

08:17.900 --> 08:20.320
I want this four elements finally.

08:20.450 --> 08:27.470
So I won the first trial and the second all I need which columns 0 1 2 3 I want the second column and

08:27.470 --> 08:31.200
the third column so second and third column and the first and second row.

08:31.260 --> 08:36.970
Now what I see one call and make two or three because it is exclusive.

08:37.070 --> 08:46.570
You need to say three and then this will be what I won the second Yeah I won second and third.

08:46.580 --> 08:48.700
So I go second.

08:48.780 --> 08:50.160
I say three or four.

08:50.210 --> 08:56.170
And for the last 45 78 59.

08:56.390 --> 08:59.930
So again this is nothing but a modern umpire.

09:00.290 --> 09:05.530
As you can see so I have sliced up a piece of the artery and I have got it for you.

09:05.570 --> 09:08.310
So that's how you slice up an umpire.

09:08.360 --> 09:15.130
And you can figure out multiple things that can be done with slicing up with an idea.

09:15.440 --> 09:16.180
Right.

09:16.580 --> 09:21.220
Let's check out some more things that can be done instead of saying one call and three.

09:21.350 --> 09:24.270
What if I say call and it will happen.

09:24.350 --> 09:27.740
It will start from the starting rule and go up to.

09:27.800 --> 09:33.100
Not to you but to go up two to three minus one because this is exclusive to two.

09:33.170 --> 09:37.240
So it came up to this one two three but columns are going to force.

09:37.250 --> 09:39.130
It means two and three.

09:39.170 --> 09:47.060
Not the fourth one two entries so this came up 15 12:45 is 78 15 now instead of instead of saying that

09:47.090 --> 09:52.960
if I had said one colon and if I remove the three out here what would have happened.

09:52.970 --> 09:56.540
It would have started from here or from here it was not from the rolls.

09:56.540 --> 10:00.700
These would have been the rules what if I-78 15:18 for the 5:58.

10:00.820 --> 10:04.170
All right what if I put something like this.

10:04.180 --> 10:04.470
OK.

10:04.480 --> 10:06.120
So that's about one.

10:06.170 --> 10:06.410
OK.

10:06.430 --> 10:07.840
What if I don't put anything.

10:07.840 --> 10:09.690
I just put a call and all happen.

10:09.700 --> 10:12.280
It will select all the rules from start to end.

10:12.700 --> 10:12.990
OK.

10:13.010 --> 10:16.090
That's that's a huge feature about this.

10:16.090 --> 10:18.480
OK so can I do that with the column Stu.

10:18.580 --> 10:18.930
OK.

10:18.940 --> 10:24.470
So let me say calm cool and full it will start from the first and go up to the Third Reich.

10:24.520 --> 10:26.990
So 0 1 2 and 3.

10:27.010 --> 10:30.140
So you go up to three because for is exclusive.

10:30.430 --> 10:30.770
OK.

10:30.790 --> 10:33.870
But start from start from all of there.

10:34.090 --> 10:34.540
Right.

10:34.690 --> 10:40.470
And if I put a value here two and interval four I just put it up here.

10:40.530 --> 10:45.730
It will start from here and go up to the end because all rules are included but columns are from the

10:45.730 --> 10:48.600
second column and two is inclusive.

10:48.670 --> 10:49.460
Correct.

10:49.570 --> 10:55.650
If I finally don't put anything just put color and it'll return to me the entire areas.

10:56.770 --> 10:57.470
Correct.

10:57.760 --> 10:58.290
OK.

10:58.510 --> 11:07.150
Now what if there is some more addition to slicing and I hope you're going to enjoy this hugely and

11:07.150 --> 11:14.310
let's say I begin with the first element got to the last element but I won.

11:14.410 --> 11:16.070
In a particular step size.

11:16.230 --> 11:17.090
What white.

11:17.200 --> 11:19.560
I can slice with a particular step size.

11:19.600 --> 11:20.090
Let's have the.
