1
00:00:01,790 --> 00:00:06,820
All right, in this video, we are going to look at these dictionaries, so these dictionaries are a

2
00:00:07,050 --> 00:00:14,010
key value base, a base, and you have a key and the value assigned to the key, you can identify the

3
00:00:14,010 --> 00:00:15,170
value using the key.

4
00:00:15,240 --> 00:00:22,290
So it's use it for username and password and password and the hash, etc. If you want to bind to base

5
00:00:22,290 --> 00:00:27,120
of values, you can use that first name and the value on the last name of the value.

6
00:00:27,150 --> 00:00:35,580
So we are going to make sure this is equal to and this dictionary will be open and close of business.

7
00:00:37,200 --> 00:00:45,620
And first, you need to have a key that is fashionable and you need to specific current.

8
00:00:45,630 --> 00:00:51,140
And so the value that's my name is first name is Naggar.

9
00:00:51,630 --> 00:01:01,470
And I want to add another key value that I want to put the because I'll comma and then it's Sarashina.

10
00:01:05,470 --> 00:01:11,390
And I'm going to add the asset side that will be fine.

11
00:01:11,860 --> 00:01:17,250
Now I want to add it and I'd say it's so current from day one.

12
00:01:19,300 --> 00:01:24,520
So now my three aspects has been added.

13
00:01:24,530 --> 00:01:25,950
Three key value-based.

14
00:01:25,960 --> 00:01:32,520
This is the key for them and the value of the keys Naggar and that this is the key and this one is this

15
00:01:32,530 --> 00:01:32,770
one.

16
00:01:32,770 --> 00:01:33,880
And they edge control.

17
00:01:34,360 --> 00:01:36,550
And let me add one more key.

18
00:01:36,550 --> 00:01:37,690
That's just a number.

19
00:01:37,690 --> 00:01:45,150
And these values can be anything, let's say three, three and four.

20
00:01:46,270 --> 00:01:49,060
So I'm going to open this dictionary.

21
00:01:53,460 --> 00:01:54,170
But on this.

22
00:01:57,040 --> 00:02:04,480
So as you can see, all my elements of this dictionary has been printed and you can also specify the

23
00:02:04,480 --> 00:02:04,870
length.

24
00:02:08,080 --> 00:02:11,410
And tough dictionary to find the number of quivering peaks.

25
00:02:13,650 --> 00:02:15,860
It is the there are four pets.

26
00:02:16,990 --> 00:02:20,630
This one is, uh, these three and these four.

27
00:02:20,650 --> 00:02:25,270
So currently we have got the number that is 240 Value-Based.

28
00:02:31,020 --> 00:02:40,590
Since we have seen the loops we can trade over this dictionary using the loops, so I first specify

29
00:02:40,590 --> 00:02:41,630
how to get the keys.

30
00:02:41,670 --> 00:02:46,080
Only you can say the keys to get the only keys.

31
00:02:46,410 --> 00:02:51,300
And if you run this, you'll get down to the first name, last name agent.

32
00:02:51,510 --> 00:02:55,220
So only that left pancit are the keys are being printed.

33
00:02:55,530 --> 00:03:02,820
And I can say instead of keys, I can say values, I mean dictionary values to get only the values of

34
00:03:02,820 --> 00:03:04,100
this Luckies.

35
00:03:05,550 --> 00:03:07,590
So as you can see the Nogoa sign.

36
00:03:07,860 --> 00:03:11,910
And so these values have been printed.

37
00:03:11,940 --> 00:03:14,380
So this is method to access only values.

38
00:03:14,520 --> 00:03:19,770
So if you want to combine both of these keys and values, there is another matter called items.

39
00:03:19,980 --> 00:03:26,250
It will combine these enterprize and it will create a list.

40
00:03:27,850 --> 00:03:34,200
So as you can see, it has written for the key value pair as in table and then second key, very presentable

41
00:03:34,200 --> 00:03:34,850
and so on.

42
00:03:34,860 --> 00:03:36,380
And as a result.

43
00:03:36,840 --> 00:03:41,640
So since this is written, we can edit rules so.

44
00:03:43,880 --> 00:03:53,490
So this verdict, so first I want to say for you to reiterate, we don't really use it because it's

45
00:03:54,200 --> 00:03:56,110
the starting is high.

46
00:03:56,150 --> 00:03:59,900
So that's why in that case.

47
00:04:01,920 --> 00:04:08,730
So this key's contents are the keys, and we will we will pass it up.

48
00:04:09,470 --> 00:04:10,110
All right.

49
00:04:10,810 --> 00:04:14,100
So is this where you can see the US?

50
00:04:15,840 --> 00:04:17,400
Let me show you this one.

51
00:04:18,390 --> 00:04:20,100
Let me set these comments.

52
00:04:23,580 --> 00:04:32,460
So you can access this of them, using this, using the key, now we can type in here, the tough Fashloom

53
00:04:33,750 --> 00:04:34,800
your good of.

54
00:04:37,250 --> 00:04:47,360
So we got the first two, are you and we can also say it, we can access these elements using this case.

55
00:04:49,200 --> 00:04:56,940
So you can also say, yes, Beketov three, because we have this key and we got the four so you can

56
00:04:56,940 --> 00:04:59,820
access this where he's using this case.

57
00:05:00,270 --> 00:05:08,110
So we will know Lupa our looked through all over this case and we get the virus so far right in the

58
00:05:08,150 --> 00:05:09,560
keys for every key.

59
00:05:09,570 --> 00:05:19,050
I'm going to get through this and bring this Dictaphone so I will get the first Naggar and say and sign

60
00:05:19,290 --> 00:05:20,630
it from day one and four.

61
00:05:20,640 --> 00:05:21,960
So let me run this.

62
00:05:24,280 --> 00:05:28,050
And as you can see, we have got the very sprinter now.

63
00:05:29,590 --> 00:05:31,630
So and lastly, we have got this.

64
00:05:33,370 --> 00:05:36,750
So this is one way of iteration.

65
00:05:37,240 --> 00:05:46,000
So if you want to trade over these items, so you need to know how to wear this here.

66
00:05:46,300 --> 00:05:47,610
Let's say it.

67
00:05:47,920 --> 00:05:48,480
Come on.

68
00:05:49,100 --> 00:05:49,550
Come on.

69
00:05:50,410 --> 00:05:57,310
So these two indicate the syndicate are the values of the keys and the white indicates are the rarest

70
00:05:57,310 --> 00:05:57,800
of items.

71
00:05:57,820 --> 00:06:04,750
So in the first iteration, XPoint to this first name and he points to the Naga and in the second iteration,

72
00:06:05,050 --> 00:06:08,010
the exponential rational and the way points to sinecures.

73
00:06:08,410 --> 00:06:16,390
So here we can just say print X, uh, plus I can do some space.

74
00:06:16,840 --> 00:06:20,650
But wait so we can we already know that we can concatenate things.

75
00:06:21,220 --> 00:06:22,540
So let me run this.

76
00:06:25,640 --> 00:06:33,800
And we have got the Fastnet Naggar and I'm sorry, but when it comes to it, it has it did not printed

77
00:06:33,800 --> 00:06:40,200
it because there is an error, because this one is integer and we cannot happen to the string.

78
00:06:40,220 --> 00:06:46,580
So that scenario right now, what we're going to do is we can convert this interesting string graphics.

79
00:06:47,000 --> 00:06:55,040
You can switch, which are white to make it into the you know, we can concatenate these various non-liquid

80
00:06:55,040 --> 00:06:57,720
on this now.

81
00:06:57,800 --> 00:07:01,930
We will get our values and each one three, four.

82
00:07:02,420 --> 00:07:05,250
And we also printed the dictionary and particularly at the rush.

83
00:07:05,690 --> 00:07:08,820
So this is how you treat over the dictionary.

84
00:07:08,840 --> 00:07:17,570
This is very easy way to declare items because you can clearly have access to the key and the values

85
00:07:17,570 --> 00:07:18,100
are pretty.

86
00:07:21,110 --> 00:07:26,150
And one more thing I want to show you is that you going to very, uh.

87
00:07:28,820 --> 00:07:33,140
Uh, it's, uh, that Farmand.

88
00:07:35,900 --> 00:07:46,970
So I want to switch with the entire thing, I want to say that's a key use and I need to speak to open

89
00:07:46,970 --> 00:07:51,710
press and press and I want to see where these.

90
00:07:55,470 --> 00:08:01,200
Open press, and now I want to print this, but we should have this open process.

91
00:08:01,260 --> 00:08:03,530
I will print the camera.

92
00:08:03,750 --> 00:08:04,740
It's come out right.

93
00:08:05,430 --> 00:08:12,230
So what this means is I'm going to print the string, which contains these placeholders.

94
00:08:12,250 --> 00:08:18,420
So these are copies, placeholders, and this value is going to be replaced by this X value because

95
00:08:18,420 --> 00:08:24,840
this is the first placeholder and the first 36 and the second prints are this overrepresent and this

96
00:08:24,840 --> 00:08:25,980
will be replaced with weight.

97
00:08:26,490 --> 00:08:27,330
So on.

98
00:08:27,780 --> 00:08:31,690
When the statement is getting executed, these two values will be put together.

99
00:08:31,860 --> 00:08:40,920
And even though the Y is integer, it will be converted to sheet and it will be printed on this.

100
00:08:42,470 --> 00:08:46,010
And you can see first for keys key.

101
00:08:46,030 --> 00:08:51,390
Why do you use non-cyclical and keys it values to do so, even though 21 is integer.

102
00:08:51,390 --> 00:08:57,130
In the previous print statement we got an error because we can't concatenate a string and integer.

103
00:08:57,150 --> 00:09:01,080
So this is very neat and a good way of programming.

104
00:09:01,480 --> 00:09:11,970
You need to format this and it will simply press the X values and values here so you can also remove

105
00:09:11,970 --> 00:09:18,120
the item from there using this this decoder pop pop off in.

106
00:09:18,240 --> 00:09:22,500
This is with the uh Keenum.

107
00:09:22,500 --> 00:09:23,400
You want to Tebow.

108
00:09:23,670 --> 00:09:28,310
Let's say I want to remove it so I can be model.

109
00:09:30,810 --> 00:09:41,370
So now I'm going to report this before printing this keys and let me run this, and now you can see

110
00:09:41,370 --> 00:09:46,410
there is no age here and there is no value for the state because we have to modise it.

111
00:09:48,390 --> 00:09:50,180
And you can just preorder

112
00:09:52,770 --> 00:09:57,990
you can demo every item and it'll be like blank dictionary.

113
00:10:01,260 --> 00:10:05,190
As you can see, I think we have cleared the dictionary values and it is open.

114
00:10:07,530 --> 00:10:15,840
So I think these are the major methods and techniques you operate with the dictionaries and these dictionaries

115
00:10:15,840 --> 00:10:22,890
are also used in rare cases are also important like that are the key value picks.

116
00:10:23,690 --> 00:10:26,100
So the term for this video, I hope you have understood.

