1 00:00:14,730 --> 00:00:15,330 Welcome back. 2 00:00:16,230 --> 00:00:25,020 In this article, we want to learn this, they've been placed on the list, OK, both on the list are 3 00:00:25,710 --> 00:00:32,150 one of the building database to be listed, one of the building database, and they are used to store 4 00:00:32,670 --> 00:00:34,320 collection of data. 5 00:00:35,070 --> 00:00:42,690 Collection of data means destroying multiple items, multiple items in a single variable death, total 6 00:00:42,690 --> 00:00:45,220 collection of items in a single variable. 7 00:00:46,410 --> 00:00:50,230 So let's see, there's the list with some examples. 8 00:00:50,250 --> 00:00:54,690 OK, so now first we have to create a variable rate. 9 00:00:55,230 --> 00:01:05,250 So a variable variable it costs and now a list and a list are created using a square bracket. 10 00:01:05,330 --> 00:01:07,770 OK, so this is all it will cost. 11 00:01:07,770 --> 00:01:11,520 And now I'm going to put a square bracket here. 12 00:01:11,970 --> 00:01:16,760 It's a square bracket and incentives square bracket. 13 00:01:16,950 --> 00:01:20,910 We can place multiple items, OK, and multiply it. 14 00:01:21,040 --> 00:01:22,230 These multiple items. 15 00:01:23,580 --> 00:01:27,990 We can separate this, we can place these items using the comma. 16 00:01:27,990 --> 00:01:29,310 OK, it's. 17 00:01:38,510 --> 00:01:40,490 I'll be listed, right? 18 00:01:40,610 --> 00:01:44,310 So we owe it to our list to bring this list. 19 00:01:44,330 --> 00:01:44,740 OK. 20 00:01:44,830 --> 00:01:50,870 And, you know, put it is our list, OK? 21 00:01:51,230 --> 00:01:52,460 This is only straight. 22 00:01:52,920 --> 00:01:58,020 So let's make sure, as we are already seeing in this bank function. 23 00:01:58,040 --> 00:01:58,260 Right. 24 00:01:58,310 --> 00:02:04,880 We are already seeing the tape function and it will be used in its function, is used to check the database. 25 00:02:05,690 --> 00:02:08,390 So let's get it out for this cost. 26 00:02:13,860 --> 00:02:25,970 As you can see here, it's a list Rio, our list here and and Rio confirmed there today is a list read. 27 00:02:31,820 --> 00:02:39,380 So determined to find out how many items the list has became, is this then functional this year? 28 00:02:39,600 --> 00:02:44,200 And if so, let's see with the example that we already released. 29 00:02:44,780 --> 00:02:53,450 So this information is stands for and OK, and it's used during the number of items in the list. 30 00:02:53,490 --> 00:02:55,130 OK, so let's see. 31 00:02:55,190 --> 00:03:01,040 Let's use this function in this example here and then our. 32 00:03:02,420 --> 00:03:08,570 Well, which is because if there's no criminal intent on this list. 33 00:03:08,600 --> 00:03:16,390 OK, so here you can see in the real four items in this list, OK, this is the use of the functional 34 00:03:16,400 --> 00:03:20,660 tools to find out how many items that list as be. 35 00:03:25,930 --> 00:03:35,680 So now we know of four items in our list, these four items, and remember this, the list we have to 36 00:03:35,680 --> 00:03:39,640 start counting in by the numbers from zero. 37 00:03:39,670 --> 00:03:46,080 Okay, so get these items are indexed and the first item has a zero index. 38 00:03:46,690 --> 00:03:49,360 So this has zero index. 39 00:03:49,360 --> 00:03:49,610 Right. 40 00:03:50,050 --> 00:03:54,870 And then this one and two and three and so on and so forth. 41 00:03:55,270 --> 00:04:00,760 So you found a particular item of this list then? 42 00:04:00,760 --> 00:04:07,260 We have to use this index talking if you want to bring this up. 43 00:04:07,450 --> 00:04:13,850 So zero one and we after the first indexed item from here. 44 00:04:14,650 --> 00:04:19,400 So this and here you can see the Honda in the output. 45 00:04:20,020 --> 00:04:21,430 So this is how it works. 46 00:04:22,270 --> 00:04:26,620 These lists are indexed and indexed, stacked from zero. 47 00:04:32,070 --> 00:04:42,630 The list items and database, the list albums can be of any did, OK, so the item in this list can 48 00:04:42,630 --> 00:04:47,940 be added and it can be a string literal or they can be. 49 00:04:48,040 --> 00:04:52,550 No, it's part of the flu or any did OK. 50 00:04:53,250 --> 00:05:03,390 And it can be a bit of a did the items instead of the list can be off immediately and also it can be 51 00:05:03,390 --> 00:05:05,540 a combination of different entities. 52 00:05:05,750 --> 00:05:13,290 Well it can be a combination of strings and numbers of extremely and integer aslambek flaws like integer 53 00:05:13,290 --> 00:05:14,750 and flawed as well. 54 00:05:15,030 --> 00:05:17,770 Let's see a quick example. 55 00:05:18,090 --> 00:05:26,550 At these items, HealthSpring, where they break the inside of this list, will items and these are 56 00:05:26,550 --> 00:05:29,500 items the other day instead of this list. 57 00:05:29,520 --> 00:05:33,780 OK, so let's put another variable here. 58 00:05:33,810 --> 00:05:34,170 OK. 59 00:05:38,490 --> 00:05:48,600 So here we are, one list here and inside of this list, we are sitting there today and any other list 60 00:05:48,600 --> 00:05:53,910 here and sort of this needs to be a new entity. 61 00:05:55,470 --> 00:05:57,870 So at least we can put into it. 62 00:05:58,050 --> 00:06:02,780 OK, so let's bring this back. 63 00:06:02,910 --> 00:06:03,890 You can see this. 64 00:06:03,930 --> 00:06:05,200 This is all OK. 65 00:06:05,880 --> 00:06:15,000 And we can also combine this data and combine these different databases in one list. 66 00:06:15,000 --> 00:06:19,280 Talking to accounts like this has been there. 67 00:06:19,410 --> 00:06:21,120 See one example. 68 00:06:21,150 --> 00:06:22,870 So here we are once again. 69 00:06:23,610 --> 00:06:36,420 So let's put a number here and separate it because so here you can see in this ghastly example, we 70 00:06:36,420 --> 00:06:44,310 are sitting here, this an distinct then we have no digital database and then we're guessing. 71 00:06:44,760 --> 00:06:45,990 And again, no. 72 00:06:46,010 --> 00:06:47,510 And this is true. 73 00:06:47,820 --> 00:06:49,140 This is a billion data. 74 00:06:49,680 --> 00:06:53,410 We and we will see this data in the next two years. 75 00:06:53,520 --> 00:06:55,080 So this is another data. 76 00:06:55,740 --> 00:07:00,830 And then we have looked here so we can combine different data in our list. 77 00:07:00,840 --> 00:07:03,540 OK, use the same data for the list. 78 00:07:04,350 --> 00:07:07,590 We can also combine the different entities in the list. 79 00:07:07,620 --> 00:07:11,280 OK, so let's bring this last one. 80 00:07:14,620 --> 00:07:18,820 So here you can see and feel different and now least. 81 00:07:24,400 --> 00:07:33,310 So we've already seen at least elements from the start, right, and there is another way to access 82 00:07:33,310 --> 00:07:34,160 the list. 83 00:07:34,180 --> 00:07:34,600 OK. 84 00:07:34,990 --> 00:07:37,030 And it's called the negative index. 85 00:07:37,240 --> 00:07:41,320 OK, so we know X is the element that we have. 86 00:07:41,470 --> 00:07:42,460 X is the list. 87 00:07:42,460 --> 00:07:46,450 Start right from this side, right starting from this side. 88 00:07:46,450 --> 00:07:47,910 Right from this Raynald. 89 00:07:48,340 --> 00:07:56,320 And there is another way we can we can also X is the list from the end, OK, from the end means that 90 00:07:56,350 --> 00:07:57,410 on this side, OK. 91 00:07:57,730 --> 00:08:00,110 And it's called negative indexing. 92 00:08:00,130 --> 00:08:05,460 OK, so from the start, this is a proper way to access the list. 93 00:08:05,470 --> 00:08:06,640 And there is another way. 94 00:08:06,790 --> 00:08:11,290 It's called the negative indexing means the items you can access from this state. 95 00:08:11,320 --> 00:08:16,090 OK, so this negative indexing starts from the end, OK, from this date. 96 00:08:16,360 --> 00:08:22,750 So now in the negative indexing, the last item, the last item here is this letter. 97 00:08:23,350 --> 00:08:29,300 So this item, the last item is referred to as minus one. 98 00:08:29,350 --> 00:08:36,300 OK, and then this second last item, which is an E on here, is referred to as a minus two. 99 00:08:36,700 --> 00:08:40,150 And then this is minus three on is minus three. 100 00:08:40,150 --> 00:08:47,550 The last item will always be minus one and then minus two second class and then so and so forth. 101 00:08:47,560 --> 00:08:50,020 So let's see the list. 102 00:08:50,170 --> 00:08:52,550 Negative indexing with the example. 103 00:08:52,570 --> 00:08:54,670 OK, so here we have an example. 104 00:08:55,030 --> 00:08:56,140 We have list here. 105 00:08:59,230 --> 00:09:04,000 Let's get access to the item on this list, on the list. 106 00:09:04,330 --> 00:09:06,910 I want to bring minus three, so. 107 00:09:09,860 --> 00:09:16,330 As you can see in this output, we get on minus three on this day, minus worklessness and minus two 108 00:09:16,610 --> 00:09:18,870 and then the Honda B minus three. 109 00:09:19,160 --> 00:09:25,680 So this is how Negrita indexing in the list to work to get the last item will be minus one. 110 00:09:25,700 --> 00:09:29,300 OK, and let's do another item here. 111 00:09:29,300 --> 00:09:31,760 OK, let's bring minus. 112 00:09:36,250 --> 00:09:43,110 So we operate in minus one, and here you can see again, we'll put here minus three, which is the 113 00:09:43,120 --> 00:09:45,340 Honda and minus one, which is the Tesla. 114 00:09:45,520 --> 00:09:51,160 So this is the negative indexing python linked to the indexing of the list in Python. 115 00:09:51,190 --> 00:09:51,460 OK. 116 00:09:57,140 --> 00:10:04,910 So this specific elements to the specific elements of the list, we can use the range. 117 00:10:04,990 --> 00:10:13,360 OK, but what this does is it will give us specific elements or specific elements from the list. 118 00:10:13,670 --> 00:10:22,100 So we hope to select the value of these elements, the value of these listed elements here and why the 119 00:10:22,100 --> 00:10:24,270 value of this selected list. 120 00:10:25,190 --> 00:10:32,270 And with that value, we can access these elements of the return value will be a new list. 121 00:10:32,300 --> 00:10:34,960 OK, the new list can be printed in the open. 122 00:10:35,000 --> 00:10:37,040 OK, so let's see with the example. 123 00:10:37,550 --> 00:10:43,670 So we have a list here and we help six out of six elements here. 124 00:10:43,680 --> 00:10:50,350 OK, in our list, as always, remember that first item has index zero, right? 125 00:10:50,870 --> 00:10:53,660 This item has failed because you law this. 126 00:10:53,660 --> 00:10:55,510 Rainard has zero. 127 00:10:56,120 --> 00:10:58,440 And let's let's drink. 128 00:10:58,880 --> 00:11:03,430 So brand means squared squared. 129 00:11:03,500 --> 00:11:04,160 Back to you. 130 00:11:04,640 --> 00:11:07,580 And you just quarterbacked the brand. 131 00:11:07,610 --> 00:11:11,030 Okay, so let's say values group, then the corner. 132 00:11:11,750 --> 00:11:17,260 And now what will happen is this will be a zero zero one group. 133 00:11:17,540 --> 00:11:24,020 So from this to from this group, all items printed out from this. 134 00:11:25,220 --> 00:11:27,330 So let's see what what happens here. 135 00:11:27,400 --> 00:11:37,550 This Prentis and as you can see here, the Nissan Tesler and BMW from this front to the all the items 136 00:11:37,550 --> 00:11:39,430 are going to be printed in the terminal. 137 00:11:39,450 --> 00:11:42,620 OK, and let's put another example here. 138 00:11:42,650 --> 00:11:51,170 So now in this example, overtrained the value output of Eldo and the right side or the right side of 139 00:11:51,170 --> 00:11:51,770 this colon. 140 00:11:51,800 --> 00:11:52,130 OK. 141 00:11:53,300 --> 00:11:54,620 Now, what will happen? 142 00:11:55,170 --> 00:11:56,520 So let's see what will happen here. 143 00:11:56,540 --> 00:12:04,250 You can see and I'll put the first one at the left side, the values side, and we will get to all the 144 00:12:04,340 --> 00:12:06,880 items that print of this weekend. 145 00:12:07,910 --> 00:12:15,410 And in this second example, when I put the value the right side of this coin, then I will get all 146 00:12:15,410 --> 00:12:20,360 the items that are in front of this of this value. 147 00:12:20,840 --> 00:12:27,110 OK, so here in this second example, we will get zero zero one, two, three, four. 148 00:12:32,620 --> 00:12:40,040 So what this really does is it will cure specific elements from the list, like we hope to celebrate, 149 00:12:40,180 --> 00:12:45,970 to start the list and work within the next hour, we can select where to start the list and where to 150 00:12:45,970 --> 00:12:52,470 end the list by using its values or or the index or the indexes of the list. 151 00:12:52,510 --> 00:13:00,760 Again, when we finally arrange the return value, it will be a new list or, you know, put in there 152 00:13:00,760 --> 00:13:05,000 to put the value in the items we have selected. 153 00:13:05,020 --> 00:13:06,220 OK, so let's go. 154 00:13:06,220 --> 00:13:15,100 For example, here is how to use this square because OK, so square because in the square bracket we 155 00:13:15,100 --> 00:13:23,420 have to select the starting point of the list, starting to start element index of this element. 156 00:13:23,440 --> 00:13:27,560 OK, so here we have six elements here. 157 00:13:27,880 --> 00:13:32,350 So let's say you want to start the list from this second item, OK? 158 00:13:32,620 --> 00:13:33,590 Second element. 159 00:13:33,590 --> 00:13:36,710 So OK, so you have good value here. 160 00:13:36,730 --> 00:13:38,770 So let's head to then. 161 00:13:38,770 --> 00:13:43,530 This colon is used to separate and then the end of the list. 162 00:13:43,810 --> 00:13:45,700 So let's say the interval before. 163 00:13:45,700 --> 00:13:47,580 For now, let's bring this again. 164 00:13:48,400 --> 00:13:52,040 So here we get to talk about two and four. 165 00:13:52,330 --> 00:13:54,030 So what happened here? 166 00:13:54,340 --> 00:14:04,500 We just selected the range two and for the item blueprinted will be in between these two and four. 167 00:14:04,840 --> 00:14:08,440 So it will be printed, but not for the list. 168 00:14:08,590 --> 00:14:13,540 And the list will end and the poor will be not included here. 169 00:14:13,570 --> 00:14:16,900 OK, so in this print, another here. 170 00:14:23,330 --> 00:14:31,610 And you can see in the output we get these three, this item has indexical three and then four, which 171 00:14:31,610 --> 00:14:38,400 is this one day, and we will not get out of with who I am. 172 00:14:38,430 --> 00:14:42,350 Okay, so this is the range of the list.