1 00:00:00,330 --> 00:00:03,990 In this video, we are discussing Python, that is implementation. 2 00:00:06,030 --> 00:00:11,870 That is a fundamental part of most programming languages, and it is the collection of elements of the 3 00:00:11,870 --> 00:00:17,880 same derivate as example, you can go for ATF and the ATF strings and so on. 4 00:00:18,530 --> 00:00:22,310 So here we are having the methods which will be operated on. 5 00:00:22,310 --> 00:00:26,480 This is and here we are having the respective functions and descriptions. 6 00:00:26,720 --> 00:00:34,610 So happened to add element to the end of the list, extend to extend all elements of a list to another 7 00:00:34,610 --> 00:00:35,030 list. 8 00:00:35,270 --> 00:00:44,210 But having this insert to insert an element at the end of that index given so remove to remove an element 9 00:00:44,300 --> 00:00:50,240 from the list so pop to remove elements return element at the given index. 10 00:00:50,420 --> 00:00:56,660 So that means in case of pop to remove elements and return that element which has been removed from 11 00:00:56,660 --> 00:01:02,010 the given index we had having clear to remove all elements from the list. 12 00:01:02,030 --> 00:01:04,740 So the list will become empty, that it will become empty. 13 00:01:05,150 --> 00:01:10,300 Next one is the next one is the index to return the index of the first MEST element. 14 00:01:10,490 --> 00:01:17,120 So that is useful for the Suchi when having this count to count the number of elements passed to an 15 00:01:17,120 --> 00:01:17,760 argument. 16 00:01:18,110 --> 00:01:23,610 So next one is our shot to shot the elements in the ascending order by default. 17 00:01:23,930 --> 00:01:27,760 Next one is the reverse to reverse order elements in a list. 18 00:01:27,860 --> 00:01:30,770 So the order of elements, whatever will be there. 19 00:01:30,770 --> 00:01:35,600 Initially that will be reversed in the application of this reverse method. 20 00:01:35,840 --> 00:01:40,090 Next one is a copy to return a copy of the elements in a list. 21 00:01:40,310 --> 00:01:43,790 So these are the different methods and the respective functions we have discussed. 22 00:01:43,970 --> 00:01:50,110 So I think it would be better if you go for a demonstration there will be executing our python codes 23 00:01:50,270 --> 00:01:54,790 to show you that how this edit can be used in Python programming. 24 00:01:55,730 --> 00:02:02,180 It is our fundamental part of most programming languages and it is the collection of elements of a single 25 00:02:02,180 --> 00:02:02,800 data type. 26 00:02:03,110 --> 00:02:10,070 And as example, we can consider adding elements like string array of integers at a float and so on. 27 00:02:10,610 --> 00:02:14,000 However, in Python there is no native added data structure. 28 00:02:14,360 --> 00:02:17,630 So you use Python list instead of an array. 29 00:02:18,020 --> 00:02:24,560 But if you want to create a real add a real Addie's in about Python, we need to use the numpties, 30 00:02:24,560 --> 00:02:26,540 adding that is a data structure. 31 00:02:26,570 --> 00:02:28,880 We are having a number by model. 32 00:02:29,210 --> 00:02:33,050 So for mathematical problems, non-pay, it would be more efficient. 33 00:02:33,440 --> 00:02:40,910 So unlike ADD is a single list can store elements of any data types and does everything and add it does 34 00:02:41,120 --> 00:02:47,870 so we can store an integer, a float and a string instead of the insta inside the same list so it is 35 00:02:47,870 --> 00:02:49,600 more flexible to work with. 36 00:02:50,060 --> 00:02:57,200 So let us go for the added descriptions and the detailing about this add handling and we are going to 37 00:02:57,200 --> 00:03:00,500 discuss how to create one edit in our python. 38 00:03:00,920 --> 00:03:04,600 So here we have defined one Eddie so definition and declaring an array. 39 00:03:04,880 --> 00:03:08,570 So these are the set of elements it is having and print error. 40 00:03:08,720 --> 00:03:10,520 So it will produce output like this one. 41 00:03:10,970 --> 00:03:14,990 So now if I want to access our edit elements, we can use the index. 42 00:03:15,140 --> 00:03:17,090 The first element will have to index zero. 43 00:03:17,390 --> 00:03:22,100 So a will print, then everyone will print twenty here. 44 00:03:22,400 --> 00:03:25,580 So error two will print thirty here and here. 45 00:03:25,580 --> 00:03:27,410 We are having this error minus one. 46 00:03:27,410 --> 00:03:29,690 That means that last element will be printed. 47 00:03:29,700 --> 00:03:32,870 That is our fifty but having this error minus two. 48 00:03:33,050 --> 00:03:34,160 So that is minus one. 49 00:03:34,170 --> 00:03:35,250 That is my minus two. 50 00:03:35,390 --> 00:03:36,930 So 40 will get printed. 51 00:03:37,040 --> 00:03:39,670 So here we are using negative indexing. 52 00:03:40,460 --> 00:03:42,790 So now let us go for another edit here. 53 00:03:43,010 --> 00:03:44,480 So here it all dismembers. 54 00:03:44,480 --> 00:03:46,790 All this add elements are of the type string. 55 00:03:47,180 --> 00:03:50,170 So if we print this brands, we're getting the output like this one. 56 00:03:50,630 --> 00:03:55,580 So finding the length of the edit, we are having the method that is the inbuilt method that is our 57 00:03:55,700 --> 00:03:56,420 line here. 58 00:03:56,630 --> 00:04:02,660 So Lindgren's so it will print it to return five here because we are having one, two, three, four, 59 00:04:02,660 --> 00:04:03,500 five elements. 60 00:04:03,890 --> 00:04:07,670 So if you print a number of brands, we are getting here five as Upwood. 61 00:04:08,000 --> 00:04:11,240 We could also add some element using that method append. 62 00:04:11,480 --> 00:04:13,480 So Branstad append intel. 63 00:04:13,580 --> 00:04:20,480 So if we go on printing Brandts, I'm getting this intel as a last element which has got appended to 64 00:04:20,480 --> 00:04:23,100 the existing edit that is of a branch. 65 00:04:23,780 --> 00:04:29,000 So now how to remove elements from and adding so to remove elements without having that method like 66 00:04:29,000 --> 00:04:29,420 remove. 67 00:04:29,420 --> 00:04:30,980 We are having the method like pop. 68 00:04:31,640 --> 00:04:34,640 So here we can find that we are having this color. 69 00:04:34,790 --> 00:04:35,710 It is different there. 70 00:04:35,720 --> 00:04:37,610 So let me bring the colors here. 71 00:04:37,610 --> 00:04:38,870 So long for preened. 72 00:04:40,380 --> 00:04:40,980 Colors. 73 00:04:41,300 --> 00:04:46,560 OK, so now if I print these colors, this particular area, we're getting the outcome like this one. 74 00:04:46,590 --> 00:04:48,570 So that is where the colors are printed. 75 00:04:48,990 --> 00:04:56,280 So now if you go for this colorful if you go for this deal, colorful, then after reviewing this colorful, 76 00:04:56,280 --> 00:04:58,870 if I print that, the outcome will be this one. 77 00:04:58,890 --> 00:05:05,420 So that is a colorful means where having the zero one, two, three, four so yellow will get deleted 78 00:05:05,430 --> 00:05:07,710 because here we have mentioned the index as four. 79 00:05:08,160 --> 00:05:10,810 So now we are having this color blue. 80 00:05:11,040 --> 00:05:14,550 So here I'm just mentioning directly their respective data items. 81 00:05:14,560 --> 00:05:17,550 So here we are mentioning that the data item, so that is a blue. 82 00:05:17,880 --> 00:05:20,640 So blue is the member of this particular area. 83 00:05:20,820 --> 00:05:22,910 So blue is going to get deleted. 84 00:05:22,920 --> 00:05:25,540 So you can find that the blue has got deleted here. 85 00:05:25,980 --> 00:05:28,380 So now we are having these colors, pop three. 86 00:05:28,680 --> 00:05:31,320 So now here we are mentioning that radically. 87 00:05:31,320 --> 00:05:32,610 The index we are mentioning. 88 00:05:32,910 --> 00:05:35,970 So you can find here there is zero one, two, three. 89 00:05:35,970 --> 00:05:37,500 So Orange will get deleted. 90 00:05:37,650 --> 00:05:43,320 And in this way, I'm getting the reduced number of elements of this ad getting printed using print 91 00:05:43,320 --> 00:05:43,770 colors. 92 00:05:44,190 --> 00:05:47,970 So in this way, we can remove items from promenading. 93 00:05:49,320 --> 00:05:53,220 So now we are going for this, modifying elements of an array using indexing. 94 00:05:53,730 --> 00:05:59,360 So fruits, apples, banana, mango, grapes and orange and having this one so fuks one. 95 00:05:59,370 --> 00:06:02,020 So I'm just assigning pineapple to that. 96 00:06:02,040 --> 00:06:03,130 Now what is outcome. 97 00:06:03,330 --> 00:06:04,710 So let me go for the print. 98 00:06:07,250 --> 00:06:12,740 So now let me go for the execution, you can find that at first this particular alley has got printed. 99 00:06:12,740 --> 00:06:14,510 Now Pruett's one one mince. 100 00:06:14,510 --> 00:06:17,440 021 So Banana will be replaced by pineapple. 101 00:06:17,450 --> 00:06:21,780 So it really does got replaced now fruits minus one, minus one means the orange. 102 00:06:21,810 --> 00:06:24,570 The last one will get replaced by this guava. 103 00:06:24,590 --> 00:06:27,940 So we are getting the updated content of this added fruits. 104 00:06:28,430 --> 00:06:32,850 So now we are going for the concatenation of two that is using the plant operator. 105 00:06:32,870 --> 00:06:38,450 So concat is equal to one, two, three and then concat, plus four, five, six. 106 00:06:38,480 --> 00:06:40,820 So now we are going to print concat. 107 00:06:41,270 --> 00:06:43,850 So now let me go for the printing here also. 108 00:06:45,740 --> 00:06:50,960 So if I go on executing, we can find that at first we are having this one, two, three, and then 109 00:06:50,960 --> 00:06:53,720 after concatenation I'm getting this one, two, three. 110 00:06:53,720 --> 00:06:54,070 Why? 111 00:06:54,260 --> 00:06:56,330 Because I didn't assign this concat. 112 00:06:56,900 --> 00:07:02,860 I didn't assign this this concatenated items in there that is available. 113 00:07:02,870 --> 00:07:04,860 So little letters write this one. 114 00:07:04,880 --> 00:07:06,710 So let me do some changes here. 115 00:07:12,680 --> 00:07:19,630 So now if I can find that so now this concat has got updated by concat plus four, five, six. 116 00:07:19,760 --> 00:07:25,370 So this is actually denuding the operator to do the concatenation between two errors. 117 00:07:25,520 --> 00:07:30,080 So now when you are printing this concatenated at we we're getting this one, two, three, four, five, 118 00:07:30,080 --> 00:07:30,460 six. 119 00:07:30,950 --> 00:07:34,250 So now we are going for the repeating elements in an array. 120 00:07:35,660 --> 00:07:37,040 So let us go for this. 121 00:07:37,040 --> 00:07:42,440 Repeated and repeated Ziegel to repeat staff five and then print repeat. 122 00:07:42,800 --> 00:07:43,980 So now what is the outcome? 123 00:07:44,000 --> 00:07:45,200 We can go for this print. 124 00:07:48,130 --> 00:07:49,570 So just executing the same. 125 00:07:50,690 --> 00:07:55,070 So that was is there a next time repeat is the goal to repeal Starfire? 126 00:07:55,100 --> 00:07:57,380 So this has got to be dead for five times. 127 00:07:58,300 --> 00:08:00,660 OK, so now we are having this this. 128 00:08:01,430 --> 00:08:03,680 So we're having the set of elements are there. 129 00:08:07,340 --> 00:08:12,380 So if I go on executing this, so at first we are getting this through, this particular area has got 130 00:08:12,380 --> 00:08:16,350 print it now, print one colon for all of us. 131 00:08:16,370 --> 00:08:21,960 Remember, the starting index will be inclusive and the ending index will be exclusive. 132 00:08:22,220 --> 00:08:23,360 So that is the index number. 133 00:08:23,690 --> 00:08:25,040 Index number one is this one. 134 00:08:25,190 --> 00:08:26,640 So one, two, three. 135 00:08:26,660 --> 00:08:32,040 So I'm expecting banana mango and should get printed is they have got printed accordingly here. 136 00:08:32,070 --> 00:08:35,830 The starting index is missing, so it will be considered a zero. 137 00:08:36,110 --> 00:08:38,120 So from Apple so tremendous. 138 00:08:38,120 --> 00:08:41,640 It will push it up to the index number two because three will be exclusive. 139 00:08:41,960 --> 00:08:43,370 So zero one two. 140 00:08:43,400 --> 00:08:47,420 So apple, banana and mango should get extracted and should get printed. 141 00:08:47,540 --> 00:08:49,670 Apple, banana, mango have got printed. 142 00:08:50,090 --> 00:08:52,640 So now it will start from this minus four. 143 00:08:52,640 --> 00:08:54,140 It will start from this minus four. 144 00:08:54,350 --> 00:08:56,790 So minus one, minus two, minus three. 145 00:08:56,810 --> 00:08:58,520 And here we are having this minus four. 146 00:08:58,760 --> 00:09:00,740 And the ending index has not been mentioned. 147 00:09:00,740 --> 00:09:03,260 So it will go printing up to the last element. 148 00:09:03,270 --> 00:09:06,520 So banana, mango, grapes and orange, they have got printed. 149 00:09:06,860 --> 00:09:09,680 So here we are having this minus minus three, minus one. 150 00:09:09,920 --> 00:09:12,040 So minus one, minus two, minus three. 151 00:09:12,050 --> 00:09:17,210 I'm getting here mango and minus one will be all is exclusive because it is the stop index. 152 00:09:17,450 --> 00:09:19,870 So that's why it will print up to minus two. 153 00:09:19,910 --> 00:09:20,850 That is our grapes. 154 00:09:21,020 --> 00:09:23,930 So in this way we can have the slicing of an eddy. 155 00:09:25,360 --> 00:09:27,450 OK, so now we are going for the next one. 156 00:09:31,650 --> 00:09:36,840 So here we are going to have our multidimensional Eddie so Ingersol multidimensional Larry, you going 157 00:09:36,840 --> 00:09:38,850 to find out where we are defining one, Eddie. 158 00:09:39,300 --> 00:09:43,730 So here's the first element is another that that is going to consisting of one and two. 159 00:09:43,740 --> 00:09:47,860 The second element is also is another area consisting of three and four and so on. 160 00:09:48,240 --> 00:09:52,350 So if you go into this multidimensional edit, you are getting the outcome like this. 161 00:09:52,770 --> 00:09:58,260 But if you bring this multidimensional zairo, that means this one to this one to this add, it will 162 00:09:58,260 --> 00:09:59,560 get printed accordingly. 163 00:09:59,580 --> 00:10:00,950 Three means zero. 164 00:10:00,990 --> 00:10:04,550 One, two, three to the seven and eight will get printed. 165 00:10:05,040 --> 00:10:12,360 So multidimensional array to one, so two and one, they are included within the square brackets individually. 166 00:10:12,720 --> 00:10:14,590 So two zero one two. 167 00:10:14,610 --> 00:10:17,490 So two means this one and one means zero one. 168 00:10:17,490 --> 00:10:20,700 So six will get printed similarly for three comma zero. 169 00:10:21,030 --> 00:10:25,200 So in case of three and they are individually enclosed within the square brackets. 170 00:10:25,410 --> 00:10:27,060 So zero, one, two, three. 171 00:10:27,060 --> 00:10:30,330 That means this particular element and it's a 081. 172 00:10:30,340 --> 00:10:32,260 So seven will get printed here. 173 00:10:32,640 --> 00:10:38,790 So in this way you have shown that how to handle Ediz in about Python programming with demonstration 174 00:10:38,790 --> 00:10:39,720 and example. 175 00:10:40,200 --> 00:10:41,400 Thanks for watching this video.