WEBVTT

00:01.600 --> 00:02.000
Okay.

00:02.000 --> 00:11.080
As you see here, we are printing this result here and it is not more readable for the user.

00:11.120 --> 00:11.560
Okay.

00:12.160 --> 00:16.800
You may understand this that the user simple user, they are not going to understand this.

00:16.840 --> 00:17.000
Okay.

00:17.000 --> 00:21.200
They are because it is not very user friendly.

00:21.800 --> 00:25.920
So the goal is to change this okay.

00:26.600 --> 00:31.080
For example I want to print that this Mac address has this IP address.

00:31.160 --> 00:36.600
And this Mac address has this IP, this Mac this IP and like that okay.

00:36.640 --> 00:43.360
So and also it has some details that we really don't need to select.

00:43.360 --> 00:47.560
So how can we bring some change to this.

00:47.840 --> 00:50.200
So we can use it better.

00:50.560 --> 00:54.520
So here we have answered and we have unanswered data.

00:54.800 --> 00:56.880
These are I think lists.

00:56.920 --> 01:00.280
Let's check that type of this.

01:00.760 --> 01:01.200
Okay.

01:04.000 --> 01:13.450
Let me check if it is list, then we can do some more detail.

01:13.450 --> 01:14.010
Some more.

01:15.530 --> 01:16.050
Uh.

01:16.090 --> 01:16.650
Let's see.

01:24.450 --> 01:28.730
Okay, so maybe it is list.

01:28.730 --> 01:32.490
Okay then receive list.

01:32.890 --> 01:33.690
So it is list.

01:33.730 --> 01:34.010
Okay.

01:34.050 --> 01:39.170
When it is list we can do a lot of things over this data.

01:39.210 --> 01:46.530
The first thing is that we don't need an answer data because we are we never capture the answer that

01:46.530 --> 01:49.290
is not received okay.

01:49.330 --> 01:50.650
Or an answer data.

01:50.650 --> 01:56.410
So here um when it is list.

01:56.410 --> 01:58.770
So we have two things okay.

01:58.770 --> 02:01.050
The first one is going to be the answer data.

02:01.090 --> 02:03.290
The second one is going to be an answer data.

02:03.570 --> 02:06.610
So I want to capture only the answer data.

02:06.810 --> 02:08.970
So I remove the unanswered data okay.

02:09.090 --> 02:12.010
now while I only want to receive one of them.

02:12.010 --> 02:15.010
So I need to specify that I want to receive the first one.

02:15.170 --> 02:18.450
And you know that the lists are indexed.

02:18.450 --> 02:21.730
So we can specify that like this.

02:21.770 --> 02:22.130
Okay.

02:22.930 --> 02:23.530
So good.

02:23.690 --> 02:31.970
Now I can use a for loop to go through and then and print each element or each packet or data of packet.

02:32.250 --> 02:37.530
So let's use for element in answer.

02:39.250 --> 02:48.890
Okay here I need to print the elements that I have here.

02:48.930 --> 02:49.730
Okay.

02:49.770 --> 02:53.490
For example I want to print the first element.

02:55.450 --> 02:55.930
Okay.

02:55.930 --> 02:59.450
If I want to print the first element what will be happen.

02:59.810 --> 03:04.610
Or before that let's print just the element and let's see what do we have.

03:04.650 --> 03:05.010
Okay.

03:06.410 --> 03:07.730
Let me save this.

03:08.810 --> 03:13.700
Or we can print the element dot Summary.

03:15.340 --> 03:16.180
And let's see.

03:22.140 --> 03:23.820
Okay.

03:23.860 --> 03:24.980
No attribute summary.

03:24.980 --> 03:25.740
No problem.

03:25.740 --> 03:29.580
Let's just print the the element itself.

03:31.100 --> 03:31.940
And.

03:34.180 --> 03:35.020
Now let's.

03:38.900 --> 03:39.460
Okay.

03:39.460 --> 03:40.180
Very good.

03:40.220 --> 03:45.900
Here you see we have uh query answer okay.

03:46.020 --> 03:47.500
The first part okay.

03:47.500 --> 03:49.380
We have a comma here okay.

03:49.740 --> 03:52.980
So this is going to be the first index okay.

03:53.020 --> 03:56.420
As you see it is destination f type are key.

03:56.460 --> 03:59.100
And also we have this one okay.

04:00.980 --> 04:02.540
How about this one okay.

04:02.540 --> 04:03.660
It's also the same.

04:05.460 --> 04:07.020
And this one also the same.

04:07.020 --> 04:10.220
So as you see we don't need the first element.

04:10.220 --> 04:13.500
So I want the second element which is the answer okay.

04:13.500 --> 04:16.580
So here I want to print only the answer.

04:16.980 --> 04:20.580
Let's come here and ask for the second one.

04:20.580 --> 04:20.820
Okay.

04:20.860 --> 04:23.060
If I give zero so that is the first one.

04:23.060 --> 04:25.700
Then I ask for the second one.

04:25.860 --> 04:26.980
Now let's go see.

04:32.420 --> 04:33.300
What happened?

04:37.940 --> 04:39.420
Now, just a moment.

04:39.860 --> 04:45.260
Okay, now we have the same thing that we had before.

04:45.460 --> 04:48.980
Okay, now I want to add one more thing.

04:49.020 --> 04:49.460
Okay.

04:49.500 --> 04:50.140
What was that?

04:50.140 --> 04:51.940
It was P is rc.

04:51.980 --> 04:52.420
Okay.

04:52.940 --> 04:57.100
Let's use P is our C.

04:57.140 --> 04:58.100
Let's save it.

04:58.660 --> 05:01.540
Or we can use dot show.

05:01.580 --> 05:04.500
Maybe it will give me more details.

05:04.580 --> 05:11.780
If it is possible or if it has the method that is called show.

05:11.860 --> 05:14.460
As you see we have that right here.

05:14.500 --> 05:14.900
Okay.

05:15.940 --> 05:18.420
So this is the first packet okay.

05:18.460 --> 05:20.740
This is the second one and much more.

05:20.740 --> 05:24.790
So here you see we have a lot of things that we can use it.

05:24.870 --> 05:29.350
The first one is the IP address which is PSR c.

05:29.390 --> 05:38.430
The second one is h w which is hardware destination or hardware source h w Isrc hardware source hardware

05:38.430 --> 05:39.190
destination.

05:40.070 --> 05:43.150
And these are the things that we really need okay to use.

05:43.550 --> 05:52.990
So here instead of using the show method I am going to use PSR, C and let's use Ctrl D okay.

05:53.030 --> 05:56.030
Ctrl c Ctrl v not really.

05:56.070 --> 05:57.710
Ctrl okay.

05:58.390 --> 06:00.150
Control C, control V.

06:00.190 --> 06:04.030
And here the first one is PS RC.

06:04.070 --> 06:08.590
The second one is going to be the hardware destination or hardware source.

06:08.590 --> 06:13.870
So H, WD or RC or destination one of them.

06:13.870 --> 06:14.670
No problem.

06:14.950 --> 06:16.630
Now let's see what do we have?

06:22.510 --> 06:33.150
Wow this is perfect But I need to have a print statement here so we can understand what we're doing.

06:35.270 --> 06:36.990
Something like this.

06:43.870 --> 06:44.270
Okay.

06:44.550 --> 06:45.230
Perfect.

06:45.350 --> 06:48.190
Now you see that this is the IP address.

06:48.190 --> 06:52.270
And this is the Mac address for this IP address are the same here.

06:52.750 --> 06:55.790
And also here we have the IP address.

06:55.790 --> 06:57.590
We have the Mac address here.

06:57.670 --> 07:04.350
Now it is a lot more better than the details that we had before something like this okay.

07:04.390 --> 07:07.910
And also also we can improve this okay.

07:07.950 --> 07:09.070
In a better way.

07:09.070 --> 07:16.910
So we can change it to rows and columns and we can read it better.

07:16.950 --> 07:20.230
Okay I will do that in the next lectures.

07:20.230 --> 07:30.310
So let's go and see how we can do this and how we can learn a lot more from this course which is Python

07:30.310 --> 07:30.790
course.
