1 00:00:00,500 --> 00:00:06,380 So now let us understand or the way we have created this file, and if you want to use this, you can 2 00:00:06,380 --> 00:00:11,840 basically use this currently in an interactive shell to check whether a particular string is in English 3 00:00:11,840 --> 00:00:12,240 or not. 4 00:00:12,650 --> 00:00:20,330 So, for example, if we go back here and we see here the import over now, the fine name that we have 5 00:00:20,330 --> 00:00:24,890 created is checking, shall we say, import Czech English. 6 00:00:25,310 --> 00:00:31,800 And then we use here the matter from Czech English dot. 7 00:00:34,190 --> 00:00:38,770 Again, the method name is all we are having is English, Czech. 8 00:00:39,440 --> 00:00:41,210 OK, so we will use this. 9 00:00:42,720 --> 00:00:43,530 Say is. 10 00:00:45,270 --> 00:00:57,600 English check and we give your say, is this sentence in English clothes, this OK, and check this 11 00:00:57,600 --> 00:00:57,760 out. 12 00:00:58,060 --> 00:01:02,490 But what you find we are having this majesty SDR is not defined. 13 00:01:02,490 --> 00:01:03,840 So let us check this. 14 00:01:04,780 --> 00:01:08,200 This is much estie or. 15 00:01:09,380 --> 00:01:11,720 OK, let's save it. 16 00:01:11,750 --> 00:01:14,330 And again, let us. 17 00:01:15,860 --> 00:01:24,170 Right down the same thing that's on line number twenty five, let's go to line. 18 00:01:25,550 --> 00:01:26,570 Twenty five, 19 00:01:29,840 --> 00:01:36,890 so in this, if we just check the output in the if condition. 20 00:01:38,220 --> 00:01:45,390 OK, now, once you have saved us, we will have to run the module again and again, we will have to 21 00:01:45,600 --> 00:01:48,440 execute it from import statement. 22 00:01:48,450 --> 00:01:59,640 So we will have to say in both English and English, not C is English. 23 00:02:00,720 --> 00:02:01,560 Chick does. 24 00:02:01,590 --> 00:02:03,390 The matter is English. 25 00:02:03,810 --> 00:02:11,100 And here we are passing is this sentence in 26 00:02:14,220 --> 00:02:18,630 English that you will get the value to. 27 00:02:18,930 --> 00:02:21,760 Now this is one way in which we can test this, OK? 28 00:02:22,200 --> 00:02:29,070 Now if you basically let us understand the particular program that we have created now for staying over 29 00:02:29,070 --> 00:02:34,410 here that we have is creating the constants in our file. 30 00:02:34,710 --> 00:02:41,010 So we have created in this case, the variables as constants, which are basically an uppercase. 31 00:02:41,040 --> 00:02:47,970 OK, so we have already understood that constants are nothing but variables whose values should never 32 00:02:47,970 --> 00:02:49,810 be changed after the set. 33 00:02:50,130 --> 00:02:56,370 So here the operator, SDR is a constant containing twenty six uppercase letters that we have set up 34 00:02:56,370 --> 00:02:59,300 for convenience and will save time typing. 35 00:02:59,490 --> 00:03:06,990 So we have used the operator SDR Constant to set up the letters and space SGA, which contains all the 36 00:03:06,990 --> 00:03:13,090 uppercase lowercase as well as a space character or type character and a new line character. 37 00:03:13,470 --> 00:03:20,520 So instead of typing out all of the uppercase lowercase letters, we just concatenated Neapolitans zero 38 00:03:20,520 --> 00:03:24,300 with the lowercase letters written by a couple letters. 39 00:03:24,310 --> 00:03:30,930 Jadot lower function and additional nonlocal characters or type a new line are represented over here 40 00:03:30,930 --> 00:03:32,390 in the case of Slashdot. 41 00:03:33,810 --> 00:03:40,670 OK, moving to the dictionary now before we continue with the rest of the code we have written here, 42 00:03:40,980 --> 00:03:47,310 we will understand more about the dictionary ticker-Tape to understand how to convert a text file into 43 00:03:47,310 --> 00:03:53,370 a story so the dictionary dictates torse values which can contain multiple other values. 44 00:03:53,640 --> 00:04:00,350 Just as the do enlist, we use an integer index to retrieve item in the list, like, for example, 45 00:04:00,410 --> 00:04:02,250 the last one in the index 42. 46 00:04:02,670 --> 00:04:07,350 But for each item in the dictionary value instead use a key to retrieve a value. 47 00:04:08,310 --> 00:04:14,520 Now, although we can use only individuals to retrieve items from a list, looky in a dictionary, value 48 00:04:14,520 --> 00:04:21,720 can be an integer or a string like for example, see where in the square brackets, say, bitin or where 49 00:04:21,720 --> 00:04:23,400 in the square brackets, an index. 50 00:04:23,790 --> 00:04:30,300 Now, dictionaries, let us organize our program, retain more flexibility than list and don't store 51 00:04:30,300 --> 00:04:36,960 items in any particular order instead of using square brackets, as the Lizardo Dictionary uses this 52 00:04:37,270 --> 00:04:40,010 Colibri that we have created over here. 53 00:04:40,050 --> 00:04:45,560 If you see so here, this English word is still we have created as a type like dictionary. 54 00:04:46,050 --> 00:04:53,850 So our dictionaries items are typed as key value pair in which key and the values are separated by colons. 55 00:04:54,270 --> 00:05:00,140 Multiple key value players are separated by commas not to retrieve values from dictionary. 56 00:05:00,150 --> 00:05:03,120 We can use square brackets with the key between them. 57 00:05:03,450 --> 00:05:10,080 Similarly, to do indexing, what list will give it a try for retrieving values from a dictionary using 58 00:05:10,080 --> 00:05:10,500 GIS? 59 00:05:10,890 --> 00:05:15,920 We will go back to our interactive shell and give it a try. 60 00:05:15,930 --> 00:05:19,050 Here we would create a dictionary one is equal to. 61 00:05:19,560 --> 00:05:22,550 Let's give your psyche one colon. 62 00:05:22,680 --> 00:05:27,690 See, this is value for given. 63 00:05:28,000 --> 00:05:29,800 OK, then we have a comma. 64 00:05:29,940 --> 00:05:38,980 Next we have ciggie two and here we have some value for you to reclose this dictionary. 65 00:05:39,270 --> 00:05:45,060 OK, and now we say dictionary one we want to print the value of given. 66 00:05:47,610 --> 00:05:57,030 So we get their case, captain, so we'll see dictionary one in bracket Kiwa, we get get this is the 67 00:05:57,030 --> 00:05:57,930 value for Kuvan. 68 00:05:58,140 --> 00:06:04,770 Similarly, if we say dictionary one and we try to bring the value of data, we get the value for it. 69 00:06:05,010 --> 00:06:08,100 OK, so your first thing is we have set up a dictionary. 70 00:06:08,100 --> 00:06:15,600 Kolas dissy do one with doki value, but we then assign the value associated with one string, which 71 00:06:15,600 --> 00:06:21,400 is another string as with list, and we can store all kinds of data types in our dictionaries notat 72 00:06:21,600 --> 00:06:24,830 as with list variables don't store dictionary values. 73 00:06:24,840 --> 00:06:27,750 Instead, the store the references to dictionaries. 74 00:06:27,970 --> 00:06:33,210 So we will look at an example which will show us two variables with references to the same dictionary, 75 00:06:33,570 --> 00:06:36,420 for example, of one which we have created now. 76 00:06:37,400 --> 00:06:46,070 OK, let's say we create the two, which is equal to see Biton and the value for this, say, 50. 77 00:06:46,750 --> 00:06:51,140 OK, then we create over one which is equal to the two. 78 00:06:51,740 --> 00:06:58,430 OK, now we say, well, one at the index of Biton, we want to change it to 90. 79 00:06:59,150 --> 00:07:07,340 OK, now if we say it does a dictionary, do we get by is equal to 90 or if we say well one again we 80 00:07:07,340 --> 00:07:09,530 get Biton is equal to 90. 81 00:07:09,950 --> 00:07:10,160 Right. 82 00:07:10,240 --> 00:07:16,070 So the first line of all your sets up another dictionary, which is a dictionary to understand we have 83 00:07:16,070 --> 00:07:17,870 only one key value pair in that. 84 00:07:18,850 --> 00:07:25,690 OK, so now you can see that it stores an image of Al-Yousef, 50, associated with the kids Biton The 85 00:07:25,690 --> 00:07:31,420 second line assigns the dictionary evaluable to another variable, which is where one and you can then 86 00:07:31,420 --> 00:07:38,710 use this variable to change the original dictionary value associated with Python stringy to 90, the 87 00:07:38,710 --> 00:07:45,490 new variable that is dictionary two and where one should return the same dictionary key value pair with 88 00:07:45,490 --> 00:07:46,840 the updated value.