WEBVTT

00:01.910 --> 00:07.440
On in this particular session, we would be learning about Ogg's and GWM.

00:08.270 --> 00:15.680
So first of all, before completely digging into what these are, let us try to understand what is the

00:15.680 --> 00:17.080
actual need for this.

00:17.960 --> 00:23.590
So let me simply create a function C. diff.

00:24.970 --> 00:34.180
This is my function name, which is my phone, and in my function, I want to give two arguments the

00:34.180 --> 00:35.020
economy.

00:35.890 --> 00:39.730
And as a result, I want to read on.

00:42.310 --> 00:43.240
There's some.

00:45.210 --> 00:51.090
Of the values which I've got as my argument, so let's say a form of.

00:54.320 --> 00:57.890
So let me run this particular function, so my.

01:02.540 --> 01:08.390
And let us say, I want to get us out of a hundred and fifty.

01:09.670 --> 01:13.050
So on running this, I get 150 as a result.

01:14.700 --> 01:21.720
Now, let us try another scenario now in this particular case, let us say I want to have.

01:23.140 --> 01:24.730
Some of these values only.

01:25.660 --> 01:28.160
That is one difference which I want to have you.

01:28.570 --> 01:37.740
I want to have a default value as zero so that in case I want to have more numbers, I want to add more

01:37.750 --> 01:38.180
numbers.

01:38.200 --> 01:44.470
I'm not sure how many numbers I will have, but I know that the maximum number of values which I will

01:44.470 --> 01:45.690
be getting is five.

01:45.940 --> 01:48.410
I just want to do a song for them.

01:49.120 --> 01:54.040
So let us copy this entire thing again and create this function again.

01:54.310 --> 01:57.820
But this time I want to given more value, Cissie.

01:58.970 --> 02:00.140
Dean and.

02:01.810 --> 02:05.220
Now, I can do the same thing here.

02:07.400 --> 02:16.070
And I can return the news now, it's fine if I have five values in hand and I run this, I will get

02:16.070 --> 02:16.570
the result.

02:17.270 --> 02:20.280
But let's say I'm not sure how many values I have.

02:20.540 --> 02:23.830
So what I can do is I can put a default value as.

02:29.790 --> 02:34.140
And in that case, if I only have to use.

02:35.440 --> 02:39.790
This would still work, but if I have just one value.

02:41.160 --> 02:42.450
It was minister.

02:43.970 --> 02:56.000
So let us run this again so far that what I can do is I can again give a default value to all of these.

02:57.570 --> 03:04.710
This is perfectly fine if I have an upper limit to the number of values which I will be having, but

03:04.920 --> 03:12.690
in case I might have state, instead of these five values, I can have a hundred values or thousand

03:12.690 --> 03:22.530
values, then it would be difficult for me to track how many variables I have created and to keep a

03:22.530 --> 03:27.660
note of each and every variable and write the entire piece of code again and again.

03:29.010 --> 03:33.060
So this is where the need for are coming.

03:34.920 --> 03:40.050
So what I can do here is I can create another function.

03:42.130 --> 03:43.180
In the same way.

03:44.650 --> 03:50.470
And in this function, I can give the initial values as default if I want if I don't want to give a

03:50.470 --> 03:54.060
default value and I wanted to throw in it, or I can do that also.

03:54.310 --> 03:57.280
But let us I just want to give the two values as default.

03:59.070 --> 04:07.250
And I want to give the value, which is I'm not sure I know that I will be getting at least two values.

04:07.530 --> 04:10.650
So let me bring these also.

04:13.460 --> 04:20.300
I am not sure if I will be getting more than two values or I'm just I just know that the minimum number

04:20.300 --> 04:21.320
of values would be, too.

04:21.500 --> 04:22.730
So I'm ready for those.

04:22.910 --> 04:28.980
And whatever extra values I'll have, I'll keep them as a part of star parks.

04:29.630 --> 04:33.920
Now, this is just a name which we have provided.

04:34.130 --> 04:37.820
We can have any other new also instead of OG's.

04:37.820 --> 04:48.320
I can give name or names or X, Y, Z, anything instead of ours.

04:48.650 --> 04:54.320
But by default, just to make it a little simplistic in nature, we just give it to you.

04:55.130 --> 05:00.830
And instead of returning some of this, what I can do is I can simply return to some of this.

05:02.170 --> 05:02.830
Plus.

05:04.830 --> 05:05.670
The SAML.

05:06.840 --> 05:07.420
Thanks.

05:09.030 --> 05:13.090
So here this ogg's is present in form of a couple.

05:13.350 --> 05:19.620
So it will basically some values inside this of some key values of this under this.

05:21.520 --> 05:32.110
So here we have the desire and in case we have more number of values, it can add those also and it

05:32.110 --> 05:35.890
could be any number of values and it will be judged on the result accordingly.

05:38.000 --> 05:39.800
Another thing to note here is.

05:41.490 --> 05:44.820
The minimum number of values which it is expecting.

05:46.080 --> 05:46.620
It's to.

05:49.100 --> 05:53.200
Because we have already said that it will be getting in the.

05:54.640 --> 06:01.210
So if we are not sure that the minimum number of values will be true, then what we can do is we can

06:01.210 --> 06:02.030
remove these.

06:02.890 --> 06:07.280
So what will happen is let's say we have just one value and we don't have other values.

06:07.720 --> 06:14.540
So in that case, if we done this, if you give us an error because it needs oppositional argument.

06:15.430 --> 06:22.060
So what we can do is instead of this, we can simply say we don't want this value.

06:22.060 --> 06:23.790
We want just one value a.

06:24.940 --> 06:33.880
And we don't want this additional value here, so based on this, it will walk perfectly fine.

06:34.510 --> 06:36.320
So it is not a trivial in nature.

06:36.340 --> 06:45.700
So instead of having this complex structure, we can simply have only Ogg's present and then we don't

06:45.700 --> 06:46.780
have any restriction.

06:46.780 --> 06:53.560
We can given one value we can give any number of values, any number of values could be given.

06:56.020 --> 06:58.900
And it was just as good as before.

07:01.400 --> 07:03.150
This is about Star.

07:03.920 --> 07:10.140
So this is when we have one type of value, which we are not sure how many values would be present.

07:10.520 --> 07:14.210
So in that case, we will be using start ups.

07:14.630 --> 07:24.170
Now, that is on the that type of method which we have, which is the Blue Ox, which is basically keyword

07:24.170 --> 07:25.030
arguments.

07:25.560 --> 07:27.530
OK, so when we say.

07:28.840 --> 07:30.240
Star OG's.

07:32.430 --> 07:45.390
It does for one of values and always remember the values which are which we are sure we would be providing

07:45.750 --> 07:47.310
would be coming up first.

07:47.580 --> 07:56.940
After that, we will be declaring the start ups and even after that, we will be starting talking about

07:56.940 --> 07:57.820
the KW.

07:58.830 --> 08:05.550
So this is the cynics and this is the order in which we will always be providing the arguments and the

08:05.550 --> 08:06.070
documents.

08:06.660 --> 08:08.520
So this is one thing to be remembered.

08:09.090 --> 08:10.350
So let me to move this.

08:10.800 --> 08:17.370
And he worded argument is given with two stars in front of it.

08:17.820 --> 08:19.470
So this would be AWB.

08:19.820 --> 08:25.170
Again, the state of new ogg's could be replaced by any of the characters or any of those strings would

08:25.170 --> 08:25.310
be.

08:25.320 --> 08:26.250
Hello, hi.

08:26.250 --> 08:31.650
My name, your name, anything like that and all it can be used for.

08:32.990 --> 08:36.200
Multiple values.

08:38.370 --> 08:41.840
That began with the same two a.m. phone from.

08:44.040 --> 08:48.030
OK, now let us see an example of this.

08:49.350 --> 08:56.730
So this gate of new arguments is in a form of a dictionary, so whenever I will be giving this, I will

08:56.730 --> 08:58.640
be giving it in form of a dictionary.

08:58.920 --> 09:03.240
So what I can do is so let me declare a function again.

09:03.240 --> 09:04.100
See this?

09:04.680 --> 09:06.190
And again, my funk.

09:07.080 --> 09:14.820
And in this function, I want to give or let us say I want to give two values, C and B, these are

09:14.820 --> 09:17.570
two default value, which I will be anyhow giving.

09:17.580 --> 09:22.560
So I'm just giving the name in case I want to give any of the traditional values.

09:22.560 --> 09:28.740
Then I can give the start of which is of which may or may not be given.

09:29.130 --> 09:34.770
And after that let's say I have these key worded arguments.

09:36.240 --> 09:44.610
OK, this is what I want to have an interest of this, what I want to do is I want to let us see the

09:44.610 --> 09:51.390
first operation, which I want to do is I just want to print the letter, say the sum of these values.

09:51.390 --> 09:54.130
So I want to print A plus B, OK?

09:54.150 --> 09:55.240
This is what I want to do.

09:56.340 --> 09:57.810
And after that.

09:58.780 --> 10:00.100
I want to check.

10:01.380 --> 10:03.000
If let us say.

10:04.590 --> 10:11.130
I'm just talking about different values, so let's say we are talking about fruit, so let us say I

10:11.130 --> 10:15.750
want to have something like if some fruit.

10:17.180 --> 10:18.410
Is president.

10:22.730 --> 10:30.410
In my key ordered arguments, OK, if in the keyboarder documents, I have some fruit.

10:31.430 --> 10:35.960
Then what I wanted to do is I just want to bring back.

10:43.770 --> 10:46.920
I love to eat.

10:49.030 --> 10:56.530
And then I want to give this in a dictionary form, right, and this has to be sort of, you know,

10:56.830 --> 10:58.550
for my thing, kind of a structure.

10:58.720 --> 11:07.150
So what I can do is I can simply say I love to eat and then I want to have the name of the value which

11:07.150 --> 11:07.530
I want.

11:07.540 --> 11:08.470
I would love to it.

11:08.770 --> 11:10.560
And then I give DOT.

11:16.110 --> 11:18.710
OK, just in mustering you.

11:23.770 --> 11:31.690
And what I love, I love to eat the value from the dictionary, so remember I said that we will be giving

11:31.690 --> 11:35.250
this in form of a key value pair or a dictionary form.

11:35.530 --> 11:38.530
So the dictionary name is KW Elsea.

11:39.100 --> 11:44.410
So KW adds, I'm from the gate was what is my key?

11:45.190 --> 11:53.960
Fruit is the key, which is that OK, so I'm checking for fruit so it will check in the dictionary which

11:53.960 --> 11:58.810
fruit you will you have provided that you like and based on that.

12:00.110 --> 12:01.320
It will give the result.

12:02.210 --> 12:10.670
OK, so we will just try to bring this back if this happens, it's well and good.

12:10.670 --> 12:14.660
If this doesn't happen, then I can see else.

12:19.250 --> 12:20.120
Brent.

12:22.870 --> 12:24.630
I paid.

12:25.820 --> 12:26.180
It's.

12:29.970 --> 12:31.530
So this is the function.

12:32.590 --> 12:35.470
And let me see my fun.

12:36.800 --> 12:43.840
I'm inside this, I want to give the value see twenty three point fifty four, which I want to add,

12:44.470 --> 12:48.560
I don't want to give any arguments so I can completely skip that.

12:48.980 --> 12:53.270
And in include I want to give.

12:54.890 --> 12:55.820
Of Throop.

12:57.250 --> 13:00.460
And the fraud, which I want to give, is saying.

13:01.500 --> 13:06.570
Banana and I have a veggie.

13:07.990 --> 13:09.610
And what would do I like?

13:11.590 --> 13:12.940
Let us say.

13:16.450 --> 13:17.240
Garrett.

13:19.860 --> 13:21.180
So let me run this.

13:22.810 --> 13:30.250
And here we get seventy seven, which is the sum of twenty three and fifty four, and I get I love to

13:30.250 --> 13:35.620
eat bananas, so let us say we didn't have fruit inside this.

13:39.630 --> 13:44.720
And I just simply done this so it would give me a true test, the result.

13:46.060 --> 13:55.860
So I just put that back, so similarly, we can have any number of these values so I can have formed

13:55.870 --> 14:00.210
vegies and like and have chocolate or anything within here.

14:00.220 --> 14:04.960
And based on that, I can give any values and I can have any arguments.

14:04.960 --> 14:06.480
And he wanted arguments.

14:06.490 --> 14:16.690
The only thing we can get off is that it has to be in this particular format that the rebels have to

14:16.690 --> 14:17.800
be forced.

14:18.100 --> 14:23.170
Then the arguments have to be given and followed by the keyword argument.

14:23.620 --> 14:29.410
And based on this, you can simply create any index or anything like that and you can just create any

14:29.770 --> 14:34.230
of your code using this entire syndicate, which has been provided to.
